- Bug in Funktionanzeige behoben
- Auszuschliessende Verzeichnisse in Projektfunktionen hinzugefügt - Dateien können als Paramter übergeben werden - Englisch hinzugefügt
This commit is contained in:
15
main.cpp
15
main.cpp
@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
|
||||
QApplication app(argc, argv);
|
||||
|
||||
app.setApplicationName("BareCode");
|
||||
app.setApplicationVersion("1.2.0");
|
||||
app.setApplicationVersion("1.3.0");
|
||||
app.setOrganizationName("BareCode");
|
||||
|
||||
// Icon
|
||||
@@ -89,5 +89,18 @@ int main(int argc, char *argv[])
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
// Datei(en) öffnen, die beim Start per Kommandozeile übergeben wurden
|
||||
// (z. B. Doppelklick auf eine Datei im Dateibrowser → "Öffnen mit BareCode").
|
||||
// Das erste Argument ist der Programmname selbst und wird übersprungen.
|
||||
QStringList cliFiles = app.arguments();
|
||||
if (!cliFiles.isEmpty())
|
||||
{
|
||||
cliFiles.removeFirst();
|
||||
}
|
||||
if (!cliFiles.isEmpty())
|
||||
{
|
||||
window.openFilesFromArguments(cliFiles);
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user