OSDN Git Service

kinfocenter: show information message when exporting is complete
authorIvailo Monev <xakepa10@gmail.com>
Wed, 27 Apr 2022 16:09:49 +0000 (16:09 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 27 Apr 2022 16:09:49 +0000 (16:09 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kinfocenter/Modules/pci/kcm_pci.cpp
kinfocenter/infocenter.cpp
kinfocenter/infocenter.h

index fef4cc9..aea1b64 100644 (file)
@@ -66,9 +66,7 @@ KCMPci::KCMPci(QWidget *parent, const QVariantList &) :
     tree->setSelectionMode(QAbstractItemView::ExtendedSelection);
     tree->setAllColumnsShowFocus(true);
     tree->setRootIsDecorated(false);
-    tree->setWhatsThis(i18n("This list displays PCI information.") );
-
-
+    tree->setWhatsThis(i18n("This list displays PCI information."));
 }
 
 KCMPci::~KCMPci() {
index 8e771be..2ac627d 100644 (file)
@@ -247,7 +247,7 @@ void KInfoCenter::exportClickedSlot()
 
        if(m_contain->exportText().isEmpty())
        {
-               KInfoCenter::showError(this,i18n("Export of the module has produced no output."));
+               KMessageBox::sorry(this,i18n("Export of the module has produced no output."));
                return;
        }
 
@@ -258,7 +258,7 @@ void KInfoCenter::exportClickedSlot()
 
        if(!exportFile.open(QIODevice::WriteOnly))
        {
-               KInfoCenter::showError(this,i18n("Unable to open file to write export information"));
+               KMessageBox::sorry(this,i18n("Unable to open file to write export information"));
                return;
        }
 
@@ -267,7 +267,7 @@ void KInfoCenter::exportClickedSlot()
                << "\n\n" << m_contain->exportText() << endl;
 
        exportFile.close();
-       KInfoCenter::showError(this, i18n("Information exported"));
+       KMessageBox::information(this, i18n("Information exported"));
 }
 
 void KInfoCenter::aboutKcmSlot()
@@ -275,8 +275,3 @@ void KInfoCenter::aboutKcmSlot()
        KAboutApplicationDialog kcmAboutDialog(m_contain->kcmAboutData());
        kcmAboutDialog.exec();
 }
-
-void KInfoCenter::showError(QWidget *parent, const QString& errorMessage)
-{
-       KMessageBox::sorry(parent, errorMessage);
-}
index f942d04..25a660c 100644 (file)
@@ -99,14 +99,6 @@ class KInfoCenter : public KXmlGuiWindow
                */
                void aboutKcmSlot();
 
-               /**
-               * Show a error message box
-               *
-               * @param parent parent object
-               * @param errorMessage error message text
-               */
-               static void showError(QWidget *parent, const QString& errorMessage);
-
        private:
 
                /**