Allow the NewDialog to be overridden by other plugins

So that Qt Design Studio can set its own implementation for the New
Project dialog box.

Task-number: QDS-4490
Change-Id: Ie04b041a5b6e25b38416f53b0ee4943839c2f64f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Samuel Ghinet
2021-08-26 20:02:55 +03:00
parent d739ba8a7d
commit 4e7ee4687b
10 changed files with 653 additions and 542 deletions

View File

@@ -56,6 +56,8 @@ class SettingsDatabase;
namespace Internal { class MainWindow; }
class NewDialog;
class CORE_EXPORT ICore : public QObject
{
Q_OBJECT
@@ -174,9 +176,12 @@ public:
static QStatusBar *statusBar();
static void saveSettings(SaveSettingsReason reason);
static void setNewDialogFactory(const std::function<NewDialog *(QWidget *)> &newFactory);
private:
static void updateNewItemDialogState();
static std::function<NewDialog *(QWidget *)> m_newDialogFactory;
};
} // namespace Core