From eaafc489fc625d71e4ce797cebb28056746896bc Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 9 Jul 2015 18:58:34 +0100 Subject: 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 --- src/executableslist.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/executableslist.h') 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::iterator &begin, std::vector::iterator &end); + /** + * @brief get the number of executables (custom or otherwise) + **/ + size_t size() const { + return m_Executables.size(); + } + private: std::vector::iterator findExe(const QString &title); -- cgit v1.3.1