diff options
-rw-r--r-- | tdeioslave/media/mounthelper/dialog.cpp | 9 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/dialog.h | 1 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 11 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.h | 6 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/unlockdialog.ui | 40 |
5 files changed, 9 insertions, 58 deletions
diff --git a/tdeioslave/media/mounthelper/dialog.cpp b/tdeioslave/media/mounthelper/dialog.cpp index ab1bb818d..d16c6d974 100644 --- a/tdeioslave/media/mounthelper/dialog.cpp +++ b/tdeioslave/media/mounthelper/dialog.cpp @@ -27,7 +27,6 @@ Dialog::Dialog(TQString url, TQString iconName) : { unlockDialog = new UnlockDialog(this); - unlockDialog->errorBox->hide(); unlockDialog->descLabel->setText(unlockDialog->descLabel->text().arg(url)); unlockDialog->descLabel->adjustSize(); unlockDialog->adjustSize(); @@ -52,14 +51,6 @@ TQString Dialog::getPassword() return unlockDialog->passwordEdit->text(); } -void Dialog::slotDialogError(TQString errorMsg) -{ - kdDebug() << __func__ << "(" << errorMsg << " )" << endl; - - unlockDialog->errorLabel->setText(TQString("<b>%1</b>").arg(errorMsg)); - unlockDialog->errorBox->show(); -} - void Dialog::slotPasswordChanged(const TQString &text) { enableButton( User1, !text.isEmpty() ); diff --git a/tdeioslave/media/mounthelper/dialog.h b/tdeioslave/media/mounthelper/dialog.h index 8444ec7dd..e704e5777 100644 --- a/tdeioslave/media/mounthelper/dialog.h +++ b/tdeioslave/media/mounthelper/dialog.h @@ -50,7 +50,6 @@ public: TQString getPassword(); public slots: - void slotDialogError(TQString errorMsg); void slotPasswordChanged(const TQString &text); private: diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index dd12901cc..e4bf41820 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -163,7 +163,6 @@ MountHelper::MountHelper() : TDEApplication() dialog = new Dialog(url.prettyURL(), iconName); connect(dialog, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotSendPassword())); connect(dialog, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancel())); - connect(this, TQT_SIGNAL(signalPasswordError(TQString)), dialog, TQT_SLOT(slotDialogError(TQString))); dialog->show(); } else if (args->isSet("l")) @@ -293,7 +292,7 @@ void MountHelper::ejectFinished(TDEProcess *proc) } } -void MountHelper::errorAndExit() +void MountHelper::error() { TQString prettyErrorString = m_errorStr; if (m_errorStr.contains("<") && m_errorStr.contains(">")) { @@ -302,6 +301,11 @@ void MountHelper::errorAndExit() } } KMessageBox::error(0, prettyErrorString); +} + +void MountHelper::errorAndExit() +{ + error(); ::exit(1); } @@ -320,8 +324,7 @@ void MountHelper::slotSendPassword() else { m_errorStr = unlockResult.contains("errStr") ? unlockResult["errStr"].toString() : i18n("Unknown unlock error."); kdDebug() << "medium unlock " << m_errorStr << endl; - emit signalPasswordError(m_errorStr); - errorAndExit(); + error(); } } diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.h b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.h index 60cdb064d..60b6c3379 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.h +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.h @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (c) 2004 Kévin Ottens <ervin ipsquad net> + Copyright (c) 2004 Kévin Ottens <ervin ipsquad net> Parts of this file are Copyright 2003 Waldo Bastian <bastian@kde.org> @@ -42,15 +42,13 @@ private: TQString m_errorStr; TQString m_mediumId; Dialog *dialog; + void error(); private slots: void slotSendPassword(); void slotCancel(); void ejectFinished(TDEProcess* proc); void errorAndExit(); - -signals: - void signalPasswordError(TQString errorMsg); }; #endif diff --git a/tdeioslave/media/mounthelper/unlockdialog.ui b/tdeioslave/media/mounthelper/unlockdialog.ui index 3a5ccb620..7b78cdb42 100644 --- a/tdeioslave/media/mounthelper/unlockdialog.ui +++ b/tdeioslave/media/mounthelper/unlockdialog.ui @@ -155,46 +155,6 @@ </widget> </hbox> </widget> - <widget class="TQGroupBox" row="2" column="0"> - <property name="name"> - <cstring>errorBox</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Error</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>errorLabel</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string></string> - </property> - <property name="alignment"> - <set>WordBreak|AlignTop</set> - </property> - </widget> - </grid> - </widget> </grid> </widget> <layoutdefaults spacing="6" margin="11"/> |