1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

[MainApp] Open a new window when starting app while already running

Open a new browser window when attempting to start another instance.

See #1315
This commit is contained in:
David Rosca 2014-05-01 14:08:06 +02:00
parent e007620da4
commit e379b1b655
2 changed files with 6 additions and 2 deletions

View File

@ -757,7 +757,7 @@ void MainApplication::saveSettings()
Settings::syncSettings();
}
void MainApplication::messageReceived(QString message)
void MainApplication::messageReceived(const QString &message)
{
QWidget* actWin = getWindow();
QUrl actUrl;
@ -791,6 +791,10 @@ void MainApplication::messageReceived(QString message)
return;
}
}
else {
// User attempted to start another instance, let's open a new window
actWin = createWindow(Qz::BW_NewWindow);
}
if (!actWin) {
if (!isClosing()) {

View File

@ -126,7 +126,7 @@ private slots:
void saveSession();
void saveSettings();
void messageReceived(QString message);
void messageReceived(const QString &message);
void windowDestroyed(QObject* window);
private: