src: Fixed macOS build
This commit is contained in:
@@ -504,3 +504,38 @@ void QtDialogView::updateErrorCount(size_t errorCount, size_t fatalCount)
|
||||
reportWindow->updateErrorCount(errorCount, fatalCount);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename DialogType, typename... ParamTypes>
|
||||
DialogType* QtDialogView::createWindow(ParamTypes... params)
|
||||
{
|
||||
DialogType* window = nullptr;
|
||||
if (m_parentWindow)
|
||||
{
|
||||
window = new DialogType(params..., m_parentWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
window = new DialogType(params..., m_mainWindow);
|
||||
}
|
||||
|
||||
connect(window, &QtIndexingDialog::canceled, &m_windowStack, &QtWindowStack::popWindow);
|
||||
connect(window, &QtIndexingDialog::finished, &m_windowStack, &QtWindowStack::clearWindows);
|
||||
connect(window, &QtIndexingDialog::visibleChanged, this, &QtDialogView::dialogVisibilityChanged);
|
||||
|
||||
if (m_mainWindow)
|
||||
{
|
||||
connect(
|
||||
m_mainWindow, &QtMainWindow::hideIndexingDialog,
|
||||
std::bind(&QtDialogView::dialogVisibilityChanged, this, true)
|
||||
);
|
||||
}
|
||||
|
||||
m_windowStack.pushWindow(window);
|
||||
|
||||
if (!m_dialogsVisible)
|
||||
{
|
||||
window->hide();
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -66,39 +66,7 @@ private:
|
||||
void updateErrorCount(size_t errorCount, size_t fatalCount);
|
||||
|
||||
template <typename DialogType, typename... ParamTypes>
|
||||
DialogType* createWindow(ParamTypes... params)
|
||||
{
|
||||
DialogType* window = nullptr;
|
||||
if (m_parentWindow)
|
||||
{
|
||||
window = new DialogType(params..., m_parentWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
window = new DialogType(params..., m_mainWindow);
|
||||
}
|
||||
|
||||
connect(window, &QtIndexingDialog::canceled, &m_windowStack, &QtWindowStack::popWindow);
|
||||
connect(window, &QtIndexingDialog::finished, &m_windowStack, &QtWindowStack::clearWindows);
|
||||
connect(window, &QtIndexingDialog::visibleChanged, this, &QtDialogView::dialogVisibilityChanged);
|
||||
|
||||
if (m_mainWindow)
|
||||
{
|
||||
connect(
|
||||
m_mainWindow, &QtMainWindow::hideIndexingDialog,
|
||||
std::bind(&QtDialogView::dialogVisibilityChanged, this, true)
|
||||
);
|
||||
}
|
||||
|
||||
m_windowStack.pushWindow(window);
|
||||
|
||||
if (!m_dialogsVisible)
|
||||
{
|
||||
window->hide();
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
DialogType* createWindow(ParamTypes... params);
|
||||
|
||||
QtMainWindow* m_mainWindow;
|
||||
QtWindow* m_parentWindow;
|
||||
|
||||
@@ -23,11 +23,11 @@ protected:
|
||||
static QLabel* createTitleLabel(QString title, QBoxLayout* layout);
|
||||
static QLabel* createMessageLabel(QBoxLayout* layout);
|
||||
static QWidget* createErrorWidget(QBoxLayout* layout);
|
||||
static QLabel* QtIndexingDialog::createFlagLabel(QWidget* parent);
|
||||
static QLabel* createFlagLabel(QWidget* parent);
|
||||
|
||||
public:
|
||||
QtIndexingDialog(bool isSubWindow, QWidget* parent = nullptr);
|
||||
virtual QSize sizeHint() const = 0;
|
||||
QSize sizeHint() const override = 0;
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
|
||||
Reference in New Issue
Block a user