Running astyle.

This commit is contained in:
lotodore
2012-03-03 14:24:00 +00:00
parent 06145f30e9
commit 295610fbf9
5 changed files with 20 additions and 16 deletions
+7 -7
View File
@@ -69,7 +69,7 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
if(myTextBrowser) {
message = message.replace("<","&lt;");
message = message.replace(">","&gt;");
message = message.replace(">","&gt;");
//doing the links
message = message.replace(QRegExp("((?:https?)://\\S+)"), "<a href=\"\\1\">\\1</a>");
@@ -103,8 +103,8 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
case INGAME_CHAT: {
message = message.replace("<a href","<a style=\"color:#"+myStyle->getChatLogTextColor()+"; text-decoration: underline;\" href");
tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextNickNotifyColor()+";\">"+message+"</span>");
}
break;
}
break;
default:
tempMsg = message;
}
@@ -119,8 +119,8 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
case INGAME_CHAT: {
message = message.replace("<a href","<a style=\"color:#"+myStyle->getChatTextNickNotifyColor()+"; text-decoration: underline;\" href");
tempMsg = QString("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+message+"</span>");
}
break;
}
break;
default:
tempMsg = message;
}
@@ -135,8 +135,8 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
case INGAME_CHAT: {
message = message.replace("<a href","<a style=\"color:#"+myStyle->getChatTextNickNotifyColor()+"; text-decoration: underline;\" href");
tempMsg = QString("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+message+"</span>");
}
break;
}
break;
default:
tempMsg = message;
}
@@ -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;
+3 -1
View File
@@ -78,7 +78,9 @@ public:
void setMySqliteLogFileName(std::string theValue) {
mySqliteLogFileName = theValue;
}
std::string getMySqliteLogFileName() { return mySqliteLogFileName; }
std::string getMySqliteLogFileName() {
return mySqliteLogFileName;
}
signals:
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);