summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/kpppwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/kpppwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp89
1 files changed, 39 insertions, 50 deletions
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp
index 7b5c74d..e466358 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.cpp
+++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp
@@ -44,15 +44,4 @@
#include <qbuttongroup.h>
-//#include <kcmdlineargs.h>
-//#include <kconfig.h>
-//#include <kdebug.h>
-#define i18n QObject::tr
-//#include <kiconloader.h> // For BarIcon
-//#include <klocale.h>
#include <qmessagebox.h>
-// #include <kseparator.h>
-// #include <kstandarddirs.h>
-// #include <kwin.h>
-// #include <khelpmenu.h>
#include <qpushbutton.h>
-//#include <kguiitem.h>
@@ -80,3 +69,3 @@ KPPPWidget *p_kppp = 0;
KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *name, bool modal, WFlags fl )
- : QDialog(parent, name, modal, fl), _pppdata(pd)
+ : QDialog(parent, name, modal, Qt::WStyle_ContextHelp ), _pppdata(pd)
{
@@ -110,3 +99,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- label1 = new QLabel(i18n("C&onnect to: "), this);
+ label1 = new QLabel(QObject::tr("C&onnect to: "), this);
l1->addWidget(label1, 0, 1);
@@ -120,3 +109,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- ID_Label = new QLabel(i18n("&Login ID:"), this);
+ ID_Label = new QLabel(QObject::tr("&Login ID:"), this);
l1->addWidget(ID_Label, 1, 1);
@@ -129,3 +118,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
this, SLOT(enterPressedInID()));
- QString tmp = i18n("<p>Type in the username that you got from your\n"
+ QString tmp = QObject::tr("<p>Type in the username that you got from your\n"
"ISP. This is especially important for PAP\n"
@@ -140,3 +129,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- PW_Label = new QLabel(i18n("&Password:"), this);
+ PW_Label = new QLabel(QObject::tr("&Password:"), this);
l1->addWidget(PW_Label, 2, 1);
@@ -150,3 +139,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- tmp = i18n("<p>Type in the password that you got from your\n"
+ tmp = QObject::tr("<p>Type in the password that you got from your\n"
"ISP. This is especially important for PAP\n"
@@ -166,3 +155,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
l3->addSpacing(10);
- log = new QCheckBox(i18n("Show lo&g window"), this);
+ log = new QCheckBox(QObject::tr("Show lo&g window"), this);
connect(log, SIGNAL(toggled(bool)),
@@ -173,3 +162,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
QWhatsThis::add(log,
- i18n("<p>This controls whether a log window is shown.\n"
+ QObject::tr("<p>This controls whether a log window is shown.\n"
"A log window shows the communication between\n"
@@ -188,4 +177,4 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
int minw = 0;
- quit_b = new QPushButton(i18n("&Quit"), this);
- // quit_b-> setGuiItem (KGuiItem(i18n("&Quit"), "exit" ) );
+ quit_b = new QPushButton(QObject::tr("&Quit"), this);
+ // quit_b-> setGuiItem (KGuiItem(QObject::tr("&Quit"), "exit" ) );
connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton()));
@@ -194,4 +183,4 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- setup_b = new QPushButton(i18n("&Setup..."), this);
-// setup_b->setGuiItem (KGuiItem(i18n("&Setup...")) );
+ setup_b = new QPushButton(QObject::tr("&Setup..."), this);
+// setup_b->setGuiItem (KGuiItem(QObject::tr("&Setup...")) );
connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton()));
@@ -205,3 +194,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
-// help_b = new QPushButton(i18n("&Help"), this);
+// help_b = new QPushButton(QObject::tr("&Help"), this);
// connect( help_b, SIGNAL(clicked()), SLOT(helpbutton()));
@@ -210,3 +199,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
// help_b->setPopup((QPopupMenu*)helpMenu->menu());
-// help_b->setGuiItem (KGuiItem(i18n("&Help"), "help" ) );
+// help_b->setGuiItem (KGuiItem(QObject::tr("&Help"), "help" ) );
@@ -215,3 +204,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
- connect_b = new QPushButton(i18n("&Connect"), this);
+ connect_b = new QPushButton(QObject::tr("&Connect"), this);
connect_b->setDefault(true);
@@ -288,3 +277,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
// QString string;
-// string = i18n("No such Account:\n%1").arg(m_strCmdlAccount);
+// string = QObject::tr("No such Account:\n%1").arg(m_strCmdlAccount);
// KMessageBox::error(this, string);
@@ -484,10 +473,10 @@ void KPPPWidget::sigPPPDDied() {
if (_pppdata->pppdError() == E_IF_TIMEOUT)
- msg = i18n("Timeout expired while waiting for the PPP interface "
+ msg = QObject::tr("Timeout expired while waiting for the PPP interface "
"to come up!");
else {
- msg = i18n("<p>The pppd daemon died unexpectedly!</p>");
+ msg = QObject::tr("<p>The pppd daemon died unexpectedly!</p>");
Modem::modem->pppdExitStatus();
if (Modem::modem->lastStatus != 99) { // more recent pppds only
- msg += i18n("<p>Exit status: %1").arg(Modem::modem->lastStatus);
- msg += i18n("</p><p>See 'man pppd' for an explanation of the error "
+ msg += QObject::tr("<p>Exit status: %1").arg(Modem::modem->lastStatus);
+ msg += QObject::tr("</p><p>See 'man pppd' for an explanation of the error "
"codes or take a look at the kppp FAQ on "
@@ -498,3 +487,3 @@ void KPPPWidget::sigPPPDDied() {
-// if(QMessageBox::warning(0, msg, i18n("Error"), i18n("&OK"), i18n("&Details...")) == QMessageBox::No)
+// if(QMessageBox::warning(0, msg, QObject::tr("Error"), QObject::tr("&OK"), QObject::tr("&Details...")) == QMessageBox::No)
// // PPPL_ShowLog();
@@ -529,3 +518,3 @@ void KPPPWidget::sigPPPDDied() {
// // helperPid = -1;
-// QString msg = i18n("kppp's helper process just died.\n"
+// QString msg = QObject::tr("kppp's helper process just died.\n"
// "Since a further execution would be pointless, "
@@ -562,3 +551,3 @@ void KPPPWidget::beginConnect() {
if(!info.exists()){
- QMessageBox::warning(this, "error", i18n("Cannot find the PPP daemon!\n"
+ QMessageBox::warning(this, "error", QObject::tr("Cannot find the PPP daemon!\n"
"Make sure that pppd is installed and "
@@ -571,3 +560,3 @@ void KPPPWidget::beginConnect() {
QString string;
- string = i18n("kppp cannot execute:\n %1\n"
+ string = QObject::tr("kppp cannot execute:\n %1\n"
"Please make sure that you have given kppp "
@@ -585,3 +574,3 @@ void KPPPWidget::beginConnect() {
QString string;
- string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
+ string = QObject::tr("kppp can not find:\n %1\nPlease make sure you have setup "
"your modem device properly "
@@ -601,3 +590,3 @@ void KPPPWidget::beginConnect() {
QMessageBox::warning(this,"error",
- i18n("You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!"));
+ QObject::tr("You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!"));
return;
@@ -608,3 +597,3 @@ void KPPPWidget::beginConnect() {
QString s;
- s = i18n("Cannot create PAP/CHAP authentication\n"
+ s = QObject::tr("Cannot create PAP/CHAP authentication\n"
"file \"%1\"").arg(PAP_AUTH_FILE);
@@ -617,3 +606,3 @@ void KPPPWidget::beginConnect() {
if (_pppdata->phonenumber().isEmpty()) {
- QString s = i18n("You must specify a telephone number!");
+ QString s = QObject::tr("You must specify a telephone number!");
QMessageBox::warning(this, "error", s);
@@ -624,3 +613,3 @@ void KPPPWidget::beginConnect() {
- QString tit = i18n("Connecting to: %1").arg(_pppdata->accname());
+ QString tit = QObject::tr("Connecting to: %1").arg(_pppdata->accname());
// con->setCaption(tit);
@@ -638,4 +627,4 @@ void KPPPWidget::disconnect() {
con->show();
- con->setCaption(i18n("Disconnecting..."));
- con->setMsg(i18n("Executing command before disconnection."));
+ con->setCaption(QObject::tr("Disconnecting..."));
+ con->setMsg(QObject::tr("Executing command before disconnection."));
@@ -694,4 +683,4 @@ void KPPPWidget::quitbutton() {
int ok = QMessageBox::warning(this,
- i18n("Exiting kPPP will close your PPP Session."),
- i18n("Quit kPPP?"));
+ QObject::tr("Exiting kPPP will close your PPP Session."),
+ QObject::tr("Quit kPPP?"));
if(ok == QMessageBox::Yes) {
@@ -738,3 +727,3 @@ void KPPPWidget::quitbutton() {
// // if(!acct->loadRuleSet(_pppdata->accountingFile())) {
-// // QString s= i18n("Can not load the accounting "
+// // QString s= QObject::tr("Can not load the accounting "
// // "ruleset \"%1\"!").arg(_pppdata->accountingFile());
@@ -828,3 +817,3 @@ void KPPPWidget::showNews() {
QDialog dlg(0, 0, true);
- dlg.setCaption(i18n("Recent Changes in KPPP"));
+ dlg.setCaption(QObject::tr("Recent Changes in KPPP"));
@@ -841,3 +830,3 @@ void KPPPWidget::showNews() {
- QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
+ QLabel *l = new QLabel(QObject::tr("From version 1.4.8 on, kppp has a new feature\n"
"called \"Quickhelp\". It's similar to a tooltip,\n"
@@ -853,3 +842,3 @@ void KPPPWidget::showNews() {
- QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg);
+ QCheckBox *cb = new QCheckBox(QObject::tr("Don't show this hint again"), &dlg);
cb->setFixedSize(cb->sizeHint());
@@ -858,3 +847,3 @@ void KPPPWidget::showNews() {
bbox->addStretch(1);
- QPushButton *ok = bbox->addButton(i18n("OK"));
+ QPushButton *ok = bbox->addButton(QObject::tr("OK"));
ok->setDefault(true);
@@ -869,3 +858,3 @@ void KPPPWidget::showNews() {
- QString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
+ QString tmp = QObject::tr("This is an example of <b>QuickHelp</b>.\n"
"This window will stay open until you\n"