Changeset View
Changeset View
Standalone View
Standalone View
app/main.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | |||||
115 | public: | 115 | public: | ||
116 | explicit KDevelopApplication(int &argc, char **argv, bool GUIenabled = true) | 116 | explicit KDevelopApplication(int &argc, char **argv, bool GUIenabled = true) | ||
117 | #if KDEVELOP_SINGLE_APP | 117 | #if KDEVELOP_SINGLE_APP | ||
118 | : SharedTools::QtSingleApplication(QStringLiteral("KDevelop"), argc, argv) | 118 | : SharedTools::QtSingleApplication(QStringLiteral("KDevelop"), argc, argv) | ||
119 | #else | 119 | #else | ||
120 | : QApplication(argc, argv, GUIenabled) | 120 | : QApplication(argc, argv, GUIenabled) | ||
121 | #endif | 121 | #endif | ||
122 | { | 122 | { | ||
123 | #if KDEVELOP_SINGLE_APP | | |||
124 | Q_UNUSED(GUIenabled); | 123 | Q_UNUSED(GUIenabled); | ||
125 | #endif | | |||
126 | | ||||
127 | connect(this, &QGuiApplication::saveStateRequest, this, &KDevelopApplication::saveState); | 124 | connect(this, &QGuiApplication::saveStateRequest, this, &KDevelopApplication::saveState); | ||
128 | } | 125 | } | ||
129 | 126 | | |||
130 | #if KDEVELOP_SINGLE_APP | 127 | #if KDEVELOP_SINGLE_APP | ||
131 | public Q_SLOTS: | 128 | public Q_SLOTS: | ||
132 | void remoteArguments(const QString &message, QObject *socket) | 129 | void remoteArguments(const QString &message, QObject *socket) | ||
133 | { | 130 | { | ||
134 | Q_UNUSED(socket); | 131 | Q_UNUSED(socket); | ||
▲ Show 20 Lines • Show All 518 Lines • ▼ Show 20 Line(s) | |||||
653 | // TODO: port to kf5 | 650 | // TODO: port to kf5 | ||
654 | // KGlobal::locale()->insertCatalog( Core::self()->componentData().catalogName() ); | 651 | // KGlobal::locale()->insertCatalog( Core::self()->componentData().catalogName() ); | ||
655 | Core* core = Core::self(); | 652 | Core* core = Core::self(); | ||
656 | if (!QProcessEnvironment::systemEnvironment().contains("KDEV_DISABLE_WELCOMEPAGE")) { | 653 | if (!QProcessEnvironment::systemEnvironment().contains("KDEV_DISABLE_WELCOMEPAGE")) { | ||
657 | core->pluginController()->loadPlugin("KDevWelcomePage"); | 654 | core->pluginController()->loadPlugin("KDevWelcomePage"); | ||
658 | } | 655 | } | ||
659 | 656 | | |||
660 | QStringList projectNames = parser.values("project"); | 657 | QStringList projectNames = parser.values("project"); | ||
661 | if(!projectNames.isEmpty()) | 658 | if(!projectNames.isEmpty()) | ||
kfunk: While at it, could change this to `projectName`, too | |||||
662 | { | 659 | { | ||
663 | foreach(const QString& p, projectNames) | 660 | foreach(const QString& p, projectNames) | ||
664 | { | 661 | { | ||
665 | QFileInfo info( p ); | 662 | QFileInfo info( p ); | ||
666 | if( info.suffix() == "kdev4" ) { | 663 | if( info.suffix() == "kdev4" ) { | ||
667 | // make sure the project is not already opened by the session controller | 664 | // make sure the project is not already opened by the session controller | ||
668 | bool shouldOpen = true; | 665 | bool shouldOpen = true; | ||
669 | Path path(info.absoluteFilePath()); | 666 | Path path(info.absoluteFilePath()); | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |
While at it, could change this to projectName, too