diff options
| author | Peter Penz <[email protected]> | 2010-09-21 16:18:20 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-09-21 16:18:20 +0000 |
| commit | fcef5f7721dbcb2fa5d672ff123edfed078c0006 (patch) | |
| tree | 9047cf5f9134d5271ba5e4407b3478219391ae60 /src/dolphincontextmenu.cpp | |
| parent | d88f623969d45df8afd773735a2f60a46a4533b4 (diff) | |
Use K_GLOBAL_STATIC for the previously committed workaround to bypass a X11-issue in combination with KModifierKeyInfo. Thanks to David Faure for the hint.
svn path=/trunk/KDE/kdebase/apps/; revision=1177902
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 116edf4f0..da76e56fe 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -37,6 +37,7 @@ #include <kmenubar.h> #include <kmessagebox.h> #include <kmimetypetrader.h> +#include <kmodifierkeyinfo.h> #include <knewfilemenu.h> #include <konqmimedata.h> #include <konq_operations.h> @@ -53,7 +54,7 @@ #include "views/dolphinview.h" #include "views/viewmodecontroller.h" -KModifierKeyInfo* DolphinContextMenu::m_keyInfo = 0; +K_GLOBAL_STATIC(KModifierKeyInfo, m_keyInfo) DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent, const KFileItem& fileInfo, @@ -127,9 +128,10 @@ void DolphinContextMenu::open() void DolphinContextMenu::initializeModifierKeyInfo() { - if (m_keyInfo == 0) { - m_keyInfo = new KModifierKeyInfo(); - } + // Access m_keyInfo, so that it gets instantiated by + // K_GLOBAL_STATIC + KModifierKeyInfo* keyInfo = m_keyInfo; + Q_UNUSED(keyInfo); } void DolphinContextMenu::slotKeyModifierPressed(Qt::Key key, bool pressed) |
