diff options
Diffstat (limited to 'src/gui/windows/logindialog.cpp')
-rw-r--r-- | src/gui/windows/logindialog.cpp | 33 |
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 |