diff options
| author | 2010-08-30 10:58:39 +0000 | |
|---|---|---|
| committer | 2010-08-30 10:58:39 +0000 | |
| commit | c8da8fd2d895236f1c4e0b62a8fc7dbe514f5609 (patch) | |
| tree | f5ceeb99a052d3946ab56a81c5337ed45b435953 | |
| parent | fixed switch documentation (diff) | |
| download | KVIrc-c8da8fd2d895236f1c4e0b62a8fc7dbe514f5609.tar.gz KVIrc-c8da8fd2d895236f1c4e0b62a8fc7dbe514f5609.tar.bz2 KVIrc-c8da8fd2d895236f1c4e0b62a8fc7dbe514f5609.zip | |
fix for #915
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4946 17fca916-40b9-46aa-a4ea-0a15b648b75c
| -rw-r--r-- | src/kvirc/ui/kvi_customtoolbar.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/kvirc/ui/kvi_customtoolbar.cpp b/src/kvirc/ui/kvi_customtoolbar.cpp index 290b0e015..e19230210 100644 --- a/src/kvirc/ui/kvi_customtoolbar.cpp +++ b/src/kvirc/ui/kvi_customtoolbar.cpp @@ -288,11 +288,18 @@ void KviCustomToolBar::dragLeaveEvent(QDragLeaveEvent *) QAction* widgetAction = actionForWidget(m_pDraggedChild); if(widgetAction) widgetAction->setVisible(false); - //ifdef workaround for #803 -#ifndef COMPILE_ON_MAC - m_pDraggedChild->deleteLater(); // don't delete it now: it's going to crash with recent Qt versions + + /* + * This is quite broken at least in qt4.6: + * Windows: we have to delete the item, or it will stay on the toolbar creating duplicates (ticket #915) + * Osx: we can't delete the item (now or later), or we will create a crash (ticket #803) + * Linux: we can't delete the item now, but deleteLater() works; + */ +#if defined(COMPILE_ON_MINGW) || defined (COMPILE_ON_WINDOWS) + delete m_pDraggedChild; +#elif !defined(COMPILE_ON_MAC) + m_pDraggedChild->deleteLater(); #endif - //delete m_pDraggedChild; m_pDraggedChild = 0; } } |
