diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 91ae5cd0..7155809b 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -24,6 +24,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(QWidget *parent, ConfigFile *c) myChat = new LobbyChat(this); + myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); + connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) ); connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) ); connect( treeWidget_GameList, SIGNAL( currentItemChanged ( QTreeWidgetItem*, QTreeWidgetItem*) ), this, SLOT( gameSelected(QTreeWidgetItem*, QTreeWidgetItem*) ) ); @@ -214,8 +216,6 @@ void gameLobbyDialogImpl::updateGameItem(QTreeWidgetItem *item, unsigned gameId) else item->setData(2, Qt::DisplayRole, tr("registering")); - QString myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); - if (info.isPasswordProtected) item->setIcon(3, QIcon(myAppDataPath+"gfx/gui/misc/lock.png")); } diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h index 0d4d93c1..9f6eabcb 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h @@ -102,6 +102,7 @@ private: bool isAdmin; bool inGame; LobbyChat *myChat; + QString myAppDataPath; };