]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinremoteencoding.cpp
Merge branch 'release/21.12'
[dolphin.git] / src / views / dolphinremoteencoding.cpp
index 4f006df5991a9c0854124027ba86bde588e69d07..c7c8b09d1f8d7205818bd69c7eae2beeab0247bd 100644 (file)
@@ -41,7 +41,7 @@ DolphinRemoteEncoding::DolphinRemoteEncoding(QObject* parent, DolphinViewActionH
           this, &DolphinRemoteEncoding::slotAboutToShow);
 
     m_menu->setEnabled(false);
-    m_menu->setDelayed(false);
+    m_menu->setPopupMode(QToolButton::InstantPopup);
 }
 
 DolphinRemoteEncoding::~DolphinRemoteEncoding()
@@ -90,7 +90,7 @@ void DolphinRemoteEncoding::fillMenu()
     QMenu* menu = m_menu->menu();
     menu->clear();
 
-
+    menu->addAction(i18n("Default"), this, SLOT(slotDefault()), 0)->setCheckable(true);
     for (int i = 0; i < m_encodingDescriptions.size();i++) {
         QAction* action = new QAction(m_encodingDescriptions.at(i), this);
         action->setCheckable(true);
@@ -100,7 +100,6 @@ void DolphinRemoteEncoding::fillMenu()
     menu->addSeparator();
 
     menu->addAction(i18n("Reload"), this, SLOT(slotReload()), 0);
-    menu->addAction(i18n("Default"), this, SLOT(slotDefault()), 0)->setCheckable(true);
     m_idDefault = m_encodingDescriptions.size() + 2;
 
     connect(menu, &QMenu::triggered, this, &DolphinRemoteEncoding::slotItemSelected);
@@ -175,7 +174,7 @@ void DolphinRemoteEncoding::slotDefault()
     // settings here since it affects what will be matched.
     KConfig config(("kio_" + m_currentURL.scheme() + "rc").toLatin1());
 
-    QStringList partList = m_currentURL.host().split('.', QString::SkipEmptyParts);
+    QStringList partList = m_currentURL.host().split('.', Qt::SkipEmptyParts);
     if (!partList.isEmpty()) {
         partList.erase(partList.begin());