diff -r 255aff92216d -r 59ff93c0ae2d QTfrontend/ui/widget/SmartLineEdit.h --- a/QTfrontend/ui/widget/SmartLineEdit.h Sat Oct 22 19:37:39 2011 +0200 +++ b/QTfrontend/ui/widget/SmartLineEdit.h Sat Oct 22 20:41:23 2011 +0200 @@ -25,9 +25,13 @@ #ifndef HEDGEWARS_SMARTLINEEDIT_H #define HEDGEWARS_SMARTLINEEDIT_H +#include +#include #include #include +#include + #include #include "HistoryLineEdit.h" @@ -59,6 +63,11 @@ SmartLineEdit(QWidget * parent = 0, int maxHistorySize = 64); /** + * @brief Class destructor. + */ + ~SmartLineEdit(); + + /** * @brief Adds commands to the auto-completion feature. * @param commands list of commands to be added. */ @@ -116,6 +125,8 @@ QStringList * m_cmds; ///< list of recognized commands QStringList * m_nicks; ///< list of recognized nicknames + /// list of recognized commands, sorted case-insensitive + QMap * m_sorted_nicks; // these variables contain information about the last replacement // they get reset whenever cursor is moved or text is changed