diff options
| author | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-07-09 18:58:34 +0100 |
|---|---|---|
| committer | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-07-09 18:58:34 +0100 |
| commit | eaafc489fc625d71e4ce797cebb28056746896bc (patch) | |
| tree | 6077e6bd54efdeb29cece017159a6b35bea22cd2 /src/executableslist.h | |
| parent | ca591dbd230bf49abad63bb13a30d04cc4725ff8 (diff) | |
Reworking the Custom Executables list and the shortcut popup.
Certainly fixes the issue where the 'toolbar' entry doesn't lose the cross.
One of the 'find' methods ignored case but none of the others did, so I've
made it not ignore case either.
Also made the code to get the desktop/startmenu paths use a more up-to-date API
Diffstat (limited to 'src/executableslist.h')
| -rw-r--r-- | src/executableslist.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/executableslist.h b/src/executableslist.h index 888dbfe1..cf2fbac3 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -42,10 +42,6 @@ struct Executable { bool m_Custom;
bool m_Toolbar;
};
-Q_DECLARE_METATYPE(Executable)
-
-
-void registerExecutable();
/*!
@@ -83,7 +79,7 @@ public: * @return the executable
* @exception runtime_error will throw an exception if the name is not correct
**/
- const Executable &find(const QString &tilte) const;
+ const Executable &find(const QString &title) const;
/**
* @brief find an executable by its name
@@ -92,7 +88,7 @@ public: * @return the executable
* @exception runtime_error will throw an exception if the name is not correct
**/
- Executable &find(const QString &tilte);
+ Executable &find(const QString &title);
/**
* @brief find an executable by a fileinfo structure
@@ -159,6 +155,13 @@ public: **/
void getExecutables(std::vector<Executable>::iterator &begin, std::vector<Executable>::iterator &end);
+ /**
+ * @brief get the number of executables (custom or otherwise)
+ **/
+ size_t size() const {
+ return m_Executables.size();
+ }
+
private:
std::vector<Executable>::iterator findExe(const QString &title);
|
