fix compilation with clang. fixes
issue #553 - thanks to julien for reporting and to drew for the first part of the fix
--- a/QTfrontend/ui/page/pageroomslist.cpp Wed Mar 13 21:02:26 2013 -0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp Fri Mar 15 11:12:42 2013 +0100
@@ -40,6 +40,16 @@
#include "lineeditcursor.h"
#include "pageroomslist.h"
+void RoomTableView::moveDown()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void RoomTableView::moveUp()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
QLayout * PageRoomsList::bodyLayoutDefinition()
{
QVBoxLayout * pageLayout = new QVBoxLayout();
@@ -231,12 +241,12 @@
void PageRoomsList::moveSelectionUp()
{
- roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+ roomsList->moveUp();
}
void PageRoomsList::moveSelectionDown()
{
- roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+ roomsList->moveDown();
}
void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous)
--- a/QTfrontend/ui/widget/hatprompt.cpp Wed Mar 13 21:02:26 2013 -0400
+++ b/QTfrontend/ui/widget/hatprompt.cpp Fri Mar 15 11:12:42 2013 +0100
@@ -35,6 +35,26 @@
#include "HatModel.h"
#include "hatprompt.h"
+void HatListView::moveUp()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
+void HatListView::moveDown()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void HatListView::moveLeft()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+}
+
+void HatListView::moveRight()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+}
+
HatPrompt::HatPrompt(int currentIndex, QWidget* parent) : QDialog(parent)
{
setModal(true);
@@ -128,22 +148,22 @@
void HatPrompt::moveUp()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+ list->moveUp();
}
void HatPrompt::moveDown()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+ list->moveDown();
}
void HatPrompt::moveLeft()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+ list->moveLeft();
}
void HatPrompt::moveRight()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+ list->moveRight();
}
void HatPrompt::onAccepted()
--- a/QTfrontend/ui/widget/themeprompt.cpp Wed Mar 13 21:02:26 2013 -0400
+++ b/QTfrontend/ui/widget/themeprompt.cpp Fri Mar 15 11:12:42 2013 +0100
@@ -35,6 +35,27 @@
#include "ThemeModel.h"
#include "themeprompt.h"
+
+void ThemeListView::moveUp()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
+void ThemeListView::moveDown()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void ThemeListView::moveLeft()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+}
+
+void ThemeListView::moveRight()
+{
+ setCurrentIndex(moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+}
+
ThemePrompt::ThemePrompt(int currentIndex, QWidget* parent) : QDialog(parent)
{
setModal(true);
@@ -128,22 +149,22 @@
void ThemePrompt::moveUp()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+ list->moveUp();
}
void ThemePrompt::moveDown()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+ list->moveDown();
}
void ThemePrompt::moveLeft()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+ list->moveLeft();
}
void ThemePrompt::moveRight()
{
- list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+ list->moveRight();
}
void ThemePrompt::onAccepted()