[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeutils/kwallet/konfigurator
From:       Laurent Montel <montel () kde ! org>
Date:       2009-06-21 11:13:57
Message-ID: 1245582837.918470.31755.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 984665 by mlaurent:

Minor optimization


 M  +9 -9      konfigurator.cpp  


--- trunk/KDE/kdeutils/kwallet/konfigurator/konfigurator.cpp #984664:984665
@@ -91,14 +91,13 @@
 
 
 void KWalletConfig::updateWalletLists() {
-	QString p1, p2;
-	p1 = _wcw->_localWallet->currentText();
-	p2 = _wcw->_defaultWallet->currentText();
+        const QString p1( _wcw->_localWallet->currentText() );
+	const QString p2( _wcw->_defaultWallet->currentText() );
 
 	_wcw->_localWallet->clear();
 	_wcw->_defaultWallet->clear();
 
-	QStringList wl = KWallet::Wallet::walletList();
+	const QStringList wl = KWallet::Wallet::walletList();
 	_wcw->_localWallet->addItems(wl);
 	_wcw->_defaultWallet->addItems(wl);
 
@@ -115,7 +114,7 @@
 QString KWalletConfig::newWallet() {
 	bool ok;
 
-	QString n = KInputDialog::getText(i18n("New Wallet"),
+	const QString n = KInputDialog::getText(i18n("New Wallet"),
 			i18n("Please choose a name for the new wallet:"),
 			QString(),
 			&ok,
@@ -136,7 +135,7 @@
 
 
 void KWalletConfig::newLocalWallet() {
-	QString n = newWallet();
+	const QString n = newWallet();
 	if (n.isEmpty()) {
 		return;
 	}
@@ -150,7 +149,7 @@
 
 
 void KWalletConfig::newNetworkWallet() {
-	QString n = newWallet();
+	const QString n = newWallet();
 	if (n.isEmpty()) {
 		return;
 	}
@@ -277,7 +276,7 @@
 	}
 
 	_cfg->sync();
-	
+
         // this restarts kwalletd if necessary
 	if (KWallet::Wallet::isEnabled()) {
             QDBusInterface kwalletd("org.kde.kwalletd", "/modules/kwalletd", KWALLETMANAGERINTERFACE);
@@ -315,7 +314,8 @@
 		KMenu *m = new KMenu(this);
 		m->addTitle(item->parent()->text(0));
 		m->addAction(i18n("&Delete"), this, SLOT(deleteEntry()), Qt::Key_Delete);
-		m->popup(pos);
+		m->exec(pos);
+                delete m;
 	}
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic