[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/widgets
From:       Kevin Ottens <ervin () kde ! org>
Date:       2010-11-04 8:03:45
Message-ID: 20101104080345.43132AC89B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1192858 by ervin:

Remove and don't use setContextMenuEnabled() if KDE_NO_DEPRECATED is
activated.


 M  +5 -1      kcombobox.cpp  
 M  +4 -0      kcombobox.h  


--- trunk/KDE/kdelibs/kdeui/widgets/kcombobox.cpp #1192857:1192858
@@ -79,8 +79,10 @@
 
     // Enable context menu by default if widget
     // is editable.
-    setContextMenuEnabled( true );
+    if (lineEdit()) {
+        lineEdit()->setContextMenuPolicy( Qt::DefaultContextMenu );
 }
+}
 
 
 bool KComboBox::contains( const QString& _text ) const
@@ -124,11 +126,13 @@
     return completionMode() == KGlobalSettings::CompletionAuto;
 }
 
+#ifndef KDE_NO_DEPRECATED
 void KComboBox::setContextMenuEnabled( bool showMenu )
 {
     if( d->klineEdit )
         d->klineEdit->setContextMenuEnabled( showMenu );
 }
+#endif
 
 
 void KComboBox::setUrlDropsEnabled( bool enable )
--- trunk/KDE/kdelibs/kdeui/widgets/kcombobox.h #1192857:1192858
@@ -181,6 +181,7 @@
      * Deprecated to reflect Qt api changes
      * @deprecated
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED void insertURL( const KUrl& url, int index = -1 )
     { insertUrl( index < 0 ? count() : index, url ); }
     KDE_DEPRECATED void insertURL( const QPixmap& pixmap, const KUrl& url, int index = -1 )
@@ -189,6 +190,7 @@
     { changeUrl( index, url ); }
     KDE_DEPRECATED void changeURL( const QPixmap& pixmap, const KUrl& url, int index )
     { changeUrl( index, QIcon(pixmap), url ); }
+#endif
 
 	/**
      * Sets @p url into the edit field of the combobox. It uses
@@ -288,7 +290,9 @@
     * @param showMenu If @p true, show the context menu.
     * @deprecated use setContextMenuPolicy
     */
+#ifndef KDE_NO_DEPRECATED
     virtual KDE_DEPRECATED void setContextMenuEnabled( bool showMenu );
+#endif
 
     /**
      * Enables/Disables handling of URL drops. If enabled and the user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic