1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01: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(); Settings::syncSettings();
} }
void MainApplication::messageReceived(QString message) void MainApplication::messageReceived(const QString &message)
{ {
QWidget* actWin = getWindow(); QWidget* actWin = getWindow();
QUrl actUrl; QUrl actUrl;
@ -791,6 +791,10 @@ void MainApplication::messageReceived(QString message)
return; return;
} }
} }
else {
// User attempted to start another instance, let's open a new window
actWin = createWindow(Qz::BW_NewWindow);
}
if (!actWin) { if (!actWin) {
if (!isClosing()) { if (!isClosing()) {

View File

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