Refactored code to handle NewFile dialog to honor black theme fix #291 (#315)

* Added displayNewFileDialog()

* Added MainWindow::displayNewFileDialog()

* Use displayNewFileDialog()
This commit is contained in:
nico 2018-02-06 19:23:01 +01:00 committed by xarkes
parent fc6159c6b3
commit ef8118a52e
3 changed files with 10 additions and 3 deletions

View File

@ -280,6 +280,13 @@ void MainWindow::openNewFile(const QString &fn, int analLevel, QList<QString> ad
displayAnalysisOptionsDialog(analLevel, advancedOptions);
}
void MainWindow::displayNewFileDialog()
{
NewFileDialog *n = new NewFileDialog();
n->setAttribute(Qt::WA_DeleteOnClose);
n->show();
}
void MainWindow::displayAnalysisOptionsDialog(int analLevel, QList<QString> advancedOptions)
{
OptionsDialog *o = new OptionsDialog(this);

View File

@ -58,6 +58,7 @@ public:
~MainWindow();
void openNewFile(const QString &fn, int analLevel = -1, QList<QString> advancedOptions = QList<QString>());
void displayNewFileDialog();
void displayAnalysisOptionsDialog(int analLevel, QList<QString> advancedOptions);
void openProject(const QString &project_name);

View File

@ -98,9 +98,8 @@ int main(int argc, char *argv[])
return 1;
}
NewFileDialog *n = new NewFileDialog();
n->setAttribute(Qt::WA_DeleteOnClose);
n->show();
MainWindow *main = new MainWindow();
main->displayNewFileDialog();
}
else // filename specified as positional argument
{