From: Ivailo Monev Date: Wed, 27 Apr 2022 16:09:49 +0000 (+0000) Subject: kinfocenter: show information message when exporting is complete X-Git-Tag: 4.22.0~632 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ead5eb7e5b78bf6d048452f6e91317a5d59433cc;p=kde%2Fkde-workspace.git kinfocenter: show information message when exporting is complete Signed-off-by: Ivailo Monev --- diff --git a/kinfocenter/Modules/pci/kcm_pci.cpp b/kinfocenter/Modules/pci/kcm_pci.cpp index fef4cc93..aea1b64c 100644 --- a/kinfocenter/Modules/pci/kcm_pci.cpp +++ b/kinfocenter/Modules/pci/kcm_pci.cpp @@ -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() { diff --git a/kinfocenter/infocenter.cpp b/kinfocenter/infocenter.cpp index 8e771be1..2ac627d0 100644 --- a/kinfocenter/infocenter.cpp +++ b/kinfocenter/infocenter.cpp @@ -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); -} diff --git a/kinfocenter/infocenter.h b/kinfocenter/infocenter.h index f942d047..25a660c2 100644 --- a/kinfocenter/infocenter.h +++ b/kinfocenter/infocenter.h @@ -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: /**