summaryrefslogtreecommitdiff
path: root/src/gui/windows/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-23 00:39:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-23 00:39:39 +0300
commitf5186d4bc4c97b357fda2df45255d81c1045ee33 (patch)
tree42e9387495e978d227b5cfe37dd55fd99c376d16 /src/gui/windows/logindialog.cpp
parent76165a338ca9679ab029e95f6c4d691e85ddb7fb (diff)
downloadmv-f5186d4bc4c97b357fda2df45255d81c1045ee33.tar.gz
mv-f5186d4bc4c97b357fda2df45255d81c1045ee33.tar.bz2
mv-f5186d4bc4c97b357fda2df45255d81c1045ee33.tar.xz
mv-f5186d4bc4c97b357fda2df45255d81c1045ee33.zip
Move updatelistmodel into gui/models directory.
Diffstat (limited to 'src/gui/windows/logindialog.cpp')
-rw-r--r--src/gui/windows/logindialog.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index edd010707..71abf153a 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -29,6 +29,7 @@
#include "input/keydata.h"
+#include "gui/models/updatelistmodel.h"
#include "gui/models/updatetypemodel.h"
#include "gui/windows/confirmdialog.h"
@@ -76,38 +77,6 @@ namespace
} urlListener;
} // namespace
-class UpdateListModel final : public ListModel
-{
- public:
- explicit UpdateListModel(LoginData *const data) :
- ListModel(),
- mLoginData(data)
- {
- }
-
- A_DELETE_COPY(UpdateListModel)
-
- ~UpdateListModel()
- { }
-
- int getNumberOfElements() override final
- {
- if (!mLoginData)
- return 0;
- return static_cast<int>(mLoginData->updateHosts.size());
- }
-
- std::string getElementAt(int i) override final
- {
- if (!mLoginData || i >= getNumberOfElements() || i < 0)
- return "???";
- return mLoginData->updateHosts[i];
- }
-
- protected:
- LoginData *mLoginData;
-};
-
LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
std::string *const updateHost):
// TRANSLATORS: login dialog name