We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 468a3d0 commit d02ac0dCopy full SHA for d02ac0d
OMEdit/OMEditGUI/main.cpp
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
41
{
42
Q_INIT_RESOURCE(resource_omedit);
43
// read the second argument if specified by user.
44
- QString fileName = argv[1];
+ QString fileName = QString();
45
// adding style sheet
46
argc++;
47
argv[(argc - 1)] = "-stylesheet=:/Resources/css/stylesheet.qss";
@@ -54,6 +54,8 @@ int main(int argc, char *argv[])
54
55
MainWindow mainwindow(&splashScreen);
56
// if user has requested to open the file by passing it in argument then,
57
+ if (a.arguments().size() > 1)
58
+ fileName = a.arguments().at(1);
59
if (!fileName.isEmpty())
60
61
// if path is relative make it absolute
0 commit comments