summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-03-05 13:43:34 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-03-05 13:59:26 (GMT)
commit3d51d223bee55011876d12011970a5ad15c4acd0 (patch)
tree5336e26f536a1178e5414332b3fba78e2b3af788 /examples/network
parent0cbf15ea0e2b2c3b40147706dd2a0ce07d8807b6 (diff)
downloadQt-3d51d223bee55011876d12011970a5ad15c4acd0.zip
Qt-3d51d223bee55011876d12011970a5ad15c4acd0.tar.gz
Qt-3d51d223bee55011876d12011970a5ad15c4acd0.tar.bz2
If no IAP defined force IAP dialog
Using TCommDbConnPref to force IAP dialog when IAP is not defined Reviewed-by: TrustMe
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/qftp/sym_iap_util.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
index 41e43a9..445036a 100644
--- a/examples/network/qftp/sym_iap_util.h
+++ b/examples/network/qftp/sym_iap_util.h
@@ -60,6 +60,7 @@
//#include <QTextCodec>
_LIT(KIapNameSetting, "IAP\\Name"); // text - mandatory
+_LIT(KIapTableIdField, "IAP\Id");
_LIT(KIapDialogPref, "IAP\\DialogPref"); // TUnit32 - optional
_LIT(KIapService, "IAP\\IAPService"); // TUnit32 - mandatory
_LIT(KIapServiceType, "IAP\\IAPServiceType"); // text - mandatory
@@ -367,20 +368,25 @@ static QString qt_OfferIapDialog() {
CleanupClosePushL(connection);
socketServ.Connect();
+
+ TCommDbConnPref prefs;
+ prefs.SetDialogPreference(ECommDbDialogPrefPrompt);
+
connection.Open(socketServ);
- connection.Start();
+ connection.Start(prefs);
connection.GetDesSetting(TPtrC(KIapNameSetting), iapName);
-
//connection.Stop();
iapName.ZeroTerminate();
QString strIapName((char*)iapName.Ptr());
int error = 0;
- if(!qt_SetDefaultIapName(strIapName, error)) {
- //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
- strIapName = QString("");
+ if(!strIapName.isEmpty()) {
+ if(!qt_SetDefaultIapName(strIapName, error)) {
+ //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
+ strIapName = QString("");
+ }
}
CleanupStack::PopAndDestroy(&connection);