mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
533d724d1b
commit
081295cb40
5 changed files with 18 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue