diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
commit | aa0726b20f398264f0a2abc60215be044b106f9c (patch) | |
tree | 070fdbc19a1106cfdd7f651a8ce76bb1b89a513d /src/password.cpp | |
parent | d3cf5b3e75aadc3b02d0b56f030d4c3f8c2c749d (diff) | |
download | basket-aa0726b20f398264f0a2abc60215be044b106f9c.tar.gz basket-aa0726b20f398264f0a2abc60215be044b106f9c.zip |
TQt4 port basket
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1232416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/password.cpp')
-rw-r--r-- | src/password.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/password.cpp b/src/password.cpp index cbac314..ee48087 100644 --- a/src/password.cpp +++ b/src/password.cpp @@ -22,23 +22,23 @@ #ifdef HAVE_LIBGPGME -#include <qlayout.h> -#include <qtoolbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kgpgme.h> #include <basket.h> -PasswordDlg::PasswordDlg(QWidget *parent, const char *name) +PasswordDlg::PasswordDlg(TQWidget *tqparent, const char *name) :KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok, - parent, name, /*modal=*/true, /*separator=*/true), w(0) + tqparent, name, /*modal=*/true, /*separator=*/true), w(0) { - QHBoxLayout* toplayout = new QHBoxLayout(plainPage(), 0, 0); + TQHBoxLayout* toptqlayout = new TQHBoxLayout(plainPage(), 0, 0); w = new Password(plainPage()); - toplayout->addWidget(w, 1); + toptqlayout->addWidget(w, 1); } PasswordDlg::~PasswordDlg() @@ -55,12 +55,12 @@ void PasswordDlg::slotOk() KDialogBase::slotOk(); } -QString PasswordDlg::key() const +TQString PasswordDlg::key() const { - QString s = w->keyCombo->currentText(); + TQString s = w->keyCombo->currentText(); if(s.length() < 16) return ""; - int n = s.findRev(' '); + int n = s.tqfindRev(' '); if(n < 0) return ""; return s.mid(n+1); @@ -71,11 +71,11 @@ int PasswordDlg::type() const return w->buttonGroup->selectedId(); } -void PasswordDlg::setKey(const QString& key) +void PasswordDlg::setKey(const TQString& key) { for(int i = 0; i < w->keyCombo->count(); ++i) { - if(w->keyCombo->text(i).find(key) >= 0) + if(w->keyCombo->text(i).tqfind(key) >= 0) { w->keyCombo->setCurrentItem(i); return; @@ -88,16 +88,16 @@ void PasswordDlg::setType(int type) w->buttonGroup->setButton(type); } -Password::Password(QWidget *parent, const char *name) - : PasswordLayout(parent, name) +Password::Password(TQWidget *tqparent, const char *name) + : PasswordLayout(tqparent, name) { KGpgMe gpg; KGpgKeyList list = gpg.keys(true); for(KGpgKeyList::iterator it = list.begin(); it != list.end(); ++it) { - QString name = gpg.checkForUtf8((*it).name); + TQString name = gpg.checkForUtf8((*it).name); - keyCombo->insertItem(QString("%1 <%2> %3").arg(name).arg((*it).email).arg((*it).id)); + keyCombo->insertItem(TQString("%1 <%2> %3").tqarg(name).tqarg((*it).email).tqarg((*it).id)); } publicPrivateRadioButton->setEnabled(keyCombo->count() > 0); keyCombo->setEnabled(keyCombo->count() > 0); |