Pass (using IPC) command line filenames to already running instance

This commit is contained in:
frostasm 2017-12-05 17:25:08 +02:00
parent 7b9b23b143
commit 165d664524
5 changed files with 136 additions and 58 deletions

View file

@ -39,14 +39,20 @@ public:
bool event(QEvent* event) override;
bool isAlreadyRunning() const;
bool sendFileNamesToRunningInstance(const QStringList& fileNames);
signals:
void openFile(const QString& filename);
void anotherInstanceStarted();
void applicationActivated();
void quitSignalReceived();
private slots:
#if defined(Q_OS_UNIX)
void quitBySignal();
#endif
void processIncomingConnection();
void socketReadyRead();
private:
QWidget* m_mainWindow;
@ -63,6 +69,7 @@ private:
bool m_alreadyRunning;
QLockFile* m_lockFile;
QLocalServer m_lockServer;
QString m_socketName;
};
#endif // KEEPASSX_APPLICATION_H