Running astyle.
This commit is contained in:
@@ -32,7 +32,7 @@ using namespace std;
|
||||
|
||||
|
||||
gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false), autoStartTimerCounter(0), lastNickListFilterState(0)
|
||||
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false), autoStartTimerCounter(0), lastNickListFilterState(0)
|
||||
{
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -1498,8 +1498,7 @@ void gameLobbyDialogImpl::changeNickListFilter(int state)
|
||||
if(lastNickListFilterState == 0) {
|
||||
myNickListSortFilterProxyModel->setLastFilterStateCountry(false);
|
||||
myNickListSortFilterProxyModel->setLastFilterStateAlpha(true);
|
||||
}
|
||||
else if(lastNickListFilterState == 1) {
|
||||
} else if(lastNickListFilterState == 1) {
|
||||
myNickListSortFilterProxyModel->setLastFilterStateCountry(true);
|
||||
myNickListSortFilterProxyModel->setLastFilterStateAlpha(false);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <QtCore>
|
||||
|
||||
MyNickListSortFilterProxyModel::MyNickListSortFilterProxyModel(QObject *parent)
|
||||
: QSortFilterProxyModel(parent), filterState(0), lastFilterStateCountry(false), lastFilterStateAlpha(true)
|
||||
: QSortFilterProxyModel(parent), filterState(0), lastFilterStateCountry(false), lastFilterStateAlpha(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,8 +67,7 @@ bool MyNickListSortFilterProxyModel::lessThan(const QModelIndex &left, const QMo
|
||||
QString leftCountryAndName(sourceModel()->data(left, 33).toString().toUpper()+sourceModel()->data(left, Qt::DisplayRole).toString().toLower());
|
||||
QString rightCountryAndName(sourceModel()->data(right, 33).toString().toUpper()+sourceModel()->data(right, Qt::DisplayRole).toString().toLower());
|
||||
return leftCountryAndName < rightCountryAndName;
|
||||
}
|
||||
else if(lastFilterStateAlpha) {
|
||||
} else if(lastFilterStateAlpha) {
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,12 @@ public:
|
||||
MyNickListSortFilterProxyModel(QObject *parent = 0);
|
||||
|
||||
void setFilterState(int state);
|
||||
void setLastFilterStateCountry( bool country ) { lastFilterStateCountry = country;}
|
||||
void setLastFilterStateAlpha( bool alpha ) { lastFilterStateAlpha = alpha;}
|
||||
void setLastFilterStateCountry( bool country ) {
|
||||
lastFilterStateCountry = country;
|
||||
}
|
||||
void setLastFilterStateAlpha( bool alpha ) {
|
||||
lastFilterStateAlpha = alpha;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
||||
|
||||
Reference in New Issue
Block a user