]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/protocolcombo.cpp
Hide the HistoryElem class from the public API of UrlNavigator
[dolphin.git] / src / protocolcombo.cpp
index b40a73b5b822446b1d74f8a14a4df2952434de54..729102973e1bfb96030c67e6093bff8de32cf1a6 100644 (file)
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
-#include <q3popupmenu.h>
+#include <QMenu>
 
 #include <kdebug.h>
 #include <kprotocolinfo.h>
@@ -34,7 +34,7 @@ ProtocolCombo::ProtocolCombo(const QString& protocol, UrlNavigator* parent)
     qSort(m_protocols);
     QStringList::iterator it = m_protocols.begin();
     QStringList::iterator itEnd = m_protocols.end();
-    Q3PopupMenu* menu = new Q3PopupMenu(this);
+    QMenu* menu = new QMenu(this);
     while (it != itEnd)
     {
         //kDebug() << "info for " << *it << " "
@@ -42,13 +42,16 @@ ProtocolCombo::ProtocolCombo(const QString& protocol, UrlNavigator* parent)
         //TODO: wow this is ugly. or .. is it? ;) we need a way to determine
         //      if a protocol is appropriate for use in a file manager. hum!
         //if (KProtocolInfo::capabilities(*it).findIndex("filemanager") == -1)
+
+        // DF: why not just supportsListing?
+
         if (KProtocolInfo::protocolClass(*it) == ":" ||
             !KProtocolManager::supportsWriting(*it))
         {
         //kDebug() << "!!! removing " << *it << endl;
             QStringList::iterator tempIt = it;
             ++tempIt;
-            m_protocols.remove(it);
+            m_protocols.erase(it);
             it = tempIt;
         }
         else
@@ -70,7 +73,7 @@ ProtocolCombo::ProtocolCombo(const QString& protocol, UrlNavigator* parent)
     //menu->insertItems(m_protocols);
     connect(menu, SIGNAL(activated(int)), this, SLOT(setProtocol(int)));
     setText(protocol);
-    setPopup(menu);
+    setMenu(menu);
     setFlat(true);
 }