1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Allow to start more instances of the same profile with --no-remote

This commit is contained in:
David Rosca 2015-10-04 19:54:59 +02:00
parent e161e45c41
commit a1d9740caf

View File

@ -210,13 +210,15 @@ MainApplication::MainApplication(int &argc, char** argv)
appId.append(QLatin1String("Portable"));
}
// TODO: This should generate some random string for appId
if (newInstance) {
if (startProfile.isEmpty() || startProfile == QLatin1String("default")) {
std::cout << "New instance cannot be started with default profile!" << std::endl;
}
else {
appId.append(startProfile);
// Generate unique appId so it is possible to start more separate instances
// of the same profile. It is dangerous to run more instances of the same profile,
// but if the user wants it, we should allow it.
appId.append(startProfile + QString::number(QDateTime::currentMSecsSinceEpoch()));
}
}