|
@@ -18,10 +18,16 @@ public:
|
|
|
// via command line arguments.
|
|
// via command line arguments.
|
|
|
void openExternalFiles(const QStringList &p_files);
|
|
void openExternalFiles(const QStringList &p_files);
|
|
|
|
|
|
|
|
|
|
+ // Ask another instance to show itself.
|
|
|
|
|
+ void showInstance();
|
|
|
|
|
+
|
|
|
// Fetch files from shared memory to open.
|
|
// Fetch files from shared memory to open.
|
|
|
// Will clear the shared memory.
|
|
// Will clear the shared memory.
|
|
|
QStringList fetchFilesToOpen();
|
|
QStringList fetchFilesToOpen();
|
|
|
|
|
|
|
|
|
|
+ // Whether this instance is asked to show itself.
|
|
|
|
|
+ bool fetchAskedToShow();
|
|
|
|
|
+
|
|
|
private:
|
|
private:
|
|
|
// The count of the entries in the buffer to hold the path of the files to open.
|
|
// The count of the entries in the buffer to hold the path of the files to open.
|
|
|
enum { FilesBufCount = 1024 };
|
|
enum { FilesBufCount = 1024 };
|
|
@@ -38,6 +44,9 @@ private:
|
|
|
// [size of file1][file1][size of file2][file 2]
|
|
// [size of file1][file1][size of file2][file 2]
|
|
|
// Unicode representation of QString.
|
|
// Unicode representation of QString.
|
|
|
ushort m_filesBuf[FilesBufCount];
|
|
ushort m_filesBuf[FilesBufCount];
|
|
|
|
|
+
|
|
|
|
|
+ // Whether other instances ask to show the legal instance.
|
|
|
|
|
+ bool m_askedToShow;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Append @p_file to the shared struct files buffer.
|
|
// Append @p_file to the shared struct files buffer.
|