From fc2a5723092ed1c2fe6b0991d9bd9def6ec24a98 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Thu, 31 Dec 2015 00:27:15 +0300 Subject: [PATCH] fix(toxme): Use format strings --- src/net/toxme.cpp | 2 +- src/widget/form/profileform.cpp | 1 - src/widget/form/profileform.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/net/toxme.cpp b/src/net/toxme.cpp index 02517af61..979d89764 100644 --- a/src/net/toxme.cpp +++ b/src/net/toxme.cpp @@ -367,6 +367,6 @@ QString Toxme::getErrorMessage(int errorCode) case -43: return QObject::tr("Internal lookup error. Please file a bug"); default: - return QObject::tr("Unknow error") + errorCode; + return QObject::tr("Unknown error (%1)").arg(errorCode); } } diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp index c66ee1390..a9906b254 100644 --- a/src/widget/form/profileform.cpp +++ b/src/widget/form/profileform.cpp @@ -458,7 +458,6 @@ void ProfileForm::onRegisterButtonClicked() QString errorMessage = Toxme::getErrorMessage(code); QMessageBox::warning(this, tr("Toxme error"), errorMessage, "Ok"); } - bodyUI->toxmeRegisterButton->setEnabled(true); bodyUI->toxmeUpdateButton->setEnabled(true); bodyUI->toxmeRegisterButton->setText(tr("Register")); diff --git a/src/widget/form/profileform.h b/src/widget/form/profileform.h index 9169e8b41..3187f454c 100644 --- a/src/widget/form/profileform.h +++ b/src/widget/form/profileform.h @@ -80,7 +80,6 @@ private slots: void onChangePassClicked(); void onAvatarClicked(); void showProfilePictureContextMenu(const QPoint &point); - void onRegisterButtonClicked(); private: