Untangle Profile from MainWindow: files on command line

There's no reason why this should be on the MainWindow widget.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-05 10:05:22 -08:00
parent 533d724d1b
commit 081295cb40
5 changed files with 18 additions and 15 deletions

View file

@ -21,6 +21,8 @@
QTranslator *qtTranslator, *ssrfTranslator;
static bool filesOnCommandLine = false;
int main(int argc, char **argv)
{
int i;
@ -77,7 +79,7 @@ int main(int argc, char **argv)
}
}
MainWindow *m = MainWindow::instance();
m->setLoadedWithFiles(!files.isEmpty() || !importedFiles.isEmpty());
filesOnCommandLine = !files.isEmpty() || !importedFiles.isEmpty();
m->loadFiles(files);
m->importFiles(importedFiles);
// in case something has gone wrong make sure we show the error message
@ -98,3 +100,8 @@ int main(int argc, char **argv)
free_prefs();
return 0;
}
bool haveFilesOnCommandLine()
{
return filesOnCommandLine;
}