summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2019-08-27 22:37:26 +0900
committerMichele Calgaro <[email protected]>2020-10-17 10:48:30 +0800
commitf4cc9ec2fad111cdb101f062a8ee63db71e57323 (patch)
treef2663a4de0b56f87d57d74ddc077a3edfa244961 /tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
parent1a089178fa6b7d19326a1b37d554f2e56c30f6f7 (diff)
downloadtdebase-f4cc9ec2fad111cdb101f062a8ee63db71e57323.tar.gz
tdebase-f4cc9ec2fad111cdb101f062a8ee63db71e57323.zip
tdeioslave media: remove duplication of feedback for tdeio_media_helper
unlocking failures and leave password input dialog open in case of wrong password supplied. This allows to quickly type in a new password instead of having to repeat the complete procedure. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp')
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp11
1 files changed, 7 insertions, 4 deletions
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();
}
}