diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2021-02-12 18:09:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 18:09:15 +0100 |
| commit | 607fafa364a1f3935b289172e3291eafed13014b (patch) | |
| tree | a4695ea1507a8c25fada52617ff4e2b7d58e9ae3 /src/moshortcut.h | |
| parent | 7dc28b10d9ed4cd4af15eeaca89b50996d6fd27d (diff) | |
| parent | 48274f33579076711c0475e84c7adf68c52df733 (diff) | |
Merge pull request #1408 from isanae/portable-shortcuts
Fixes for portable shortcuts
Diffstat (limited to 'src/moshortcut.h')
| -rw-r--r-- | src/moshortcut.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/moshortcut.h b/src/moshortcut.h index 33346bb9..a693b6df 100644 --- a/src/moshortcut.h +++ b/src/moshortcut.h @@ -3,21 +3,42 @@ #include <QString> +class Instance; + class MOShortcut { public: MOShortcut(const QString& link={}); - /// true iff intialized using a valid moshortcut link - bool isValid() const { return m_valid; } + // true if initialized using a valid moshortcut link + // + bool isValid() const; + + // whether an instance name was given + // + bool hasInstance() const; + + // whether an executable name was given + // + bool hasExecutable() const; - bool hasInstance() const { return m_hasInstance; } + // name of the instance given, "Portable" for portable; undefined if + // hasInstance() returns false + // + QString instanceDisplayName() const; - bool hasExecutable() const { return m_hasExecutable; } + // name of the instance given, empty for portable; undefined if hasInstance() + // returns false + // + const QString& instanceName() const; - const QString& instance() const { return m_instance; } + // name of the executable given + // + const QString& executableName() const; - const QString& executable() const { return m_executable; } + // whether this shortcut is for the given instance + // + bool isForInstance(const Instance& i) const; QString toString() const; |
