# HG changeset patch # User sheepluva # Date 1363342362 -3600 # Node ID 924840dad6a01d2536cceb9b06e9aa19794c5990 # Parent b39f433f8ab47d44a3bd2cfe61f393d8f7767767 fix compilation with clang. fixes issue 553 - thanks to julien for reporting and to drew for the first part of the fix diff -r b39f433f8ab4 -r 924840dad6a0 QTfrontend/ui/page/pageroomslist.cpp --- 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) diff -r b39f433f8ab4 -r 924840dad6a0 QTfrontend/ui/widget/hatprompt.cpp --- 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() diff -r b39f433f8ab4 -r 924840dad6a0 QTfrontend/ui/widget/themeprompt.cpp --- 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()