diff --git a/src/core/feedsmodel.cpp b/src/core/feedsmodel.cpp index 4135b84e6..aecc3406f 100755 --- a/src/core/feedsmodel.cpp +++ b/src/core/feedsmodel.cpp @@ -19,6 +19,7 @@ #include "core/feedsmodel.h" #include "definitions/definitions.h" +#include "gui/dialogs/formmain.h" #include "miscellaneous/databasefactory.h" #include "miscellaneous/feedreader.h" #include "miscellaneous/iconfactory.h" @@ -94,7 +95,7 @@ QStringList FeedsModel::mimeTypes() const { } bool FeedsModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, - const QModelIndex& parent) { + const QModelIndex& parent) { Q_UNUSED(row) Q_UNUSED(column) @@ -539,8 +540,8 @@ void FeedsModel::loadActivatedServiceAccounts() { } if (serviceRoots().isEmpty()) { - QTimer::singleShot(2000, [this]() { - addServiceAccount(StandardServiceEntryPoint().createNewRoot(), true); + QTimer::singleShot(3000, [this]() { + qApp->mainForm()->showAddAccountDialog(); }); } } diff --git a/src/core/feedsmodel.h b/src/core/feedsmodel.h index a287bfdd5..f34c3a784 100755 --- a/src/core/feedsmodel.h +++ b/src/core/feedsmodel.h @@ -64,7 +64,7 @@ class FeedsModel : public QAbstractItemModel { // Returns all activated service roots. // NOTE: Service root nodes are lying directly UNDER // the model root item. - QListserviceRoots() const; + QList serviceRoots() const; // Determines if there is any account activated from given entry point. bool containsServiceRootFromEntryPoint(const ServiceEntryPoint* point) const; @@ -79,15 +79,15 @@ class FeedsModel : public QAbstractItemModel { // so feeds with "default" auto-update strategy should be updated. // // This method might change some properties of some feeds. - QListfeedsForScheduledUpdate(bool auto_update_now); + QList feedsForScheduledUpdate(bool auto_update_now); // Returns (undeleted) messages for given feeds. // This is usually used for displaying whole feeds // in "newspaper" mode. - QListmessagesForItem(RootItem* item) const; + QList messagesForItem(RootItem* item) const; // Returns ALL RECURSIVE CHILD feeds contained within single index. - QListfeedsForIndex(const QModelIndex& index) const; + QList feedsForIndex(const QModelIndex& index) const; // Returns feed/category which lies at the specified index or // root item if index is invalid. diff --git a/src/gui/dialogs/formmain.h b/src/gui/dialogs/formmain.h index 8ab0e0d09..3ca20f983 100755 --- a/src/gui/dialogs/formmain.h +++ b/src/gui/dialogs/formmain.h @@ -67,6 +67,8 @@ class FormMain : public QMainWindow { // Turns on/off fullscreen mode void switchFullscreenMode(); + void showAddAccountDialog(); + private slots: void updateAddItemMenu(); void updateRecycleBinMenu(); @@ -83,7 +85,6 @@ class FormMain : public QMainWindow { void backupDatabaseSettings(); void restoreDatabaseSettings(); void showWiki(); - void showAddAccountDialog(); void showDbCleanupAssistant(); void reportABug(); void donate();