author | zecke <zecke> | 2004-12-20 22:27:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-12-20 22:27:21 (UTC) |
commit | 89b3fd61bdd13e62ff64bd7ab0b15c10a964b867 (patch) (unidiff) | |
tree | 6cc25286965e93788e9e47b7743f2379ec328bf5 | |
parent | 2be4d5bf420dc4aff71cf78601c095a96ed88c47 (diff) | |
download | opie-89b3fd61bdd13e62ff64bd7ab0b15c10a964b867.zip opie-89b3fd61bdd13e62ff64bd7ab0b15c10a964b867.tar.gz opie-89b3fd61bdd13e62ff64bd7ab0b15c10a964b867.tar.bz2 |
Restore change
-QPEApplication::qpeDir() is guranteed to be '/' terminated
-rw-r--r-- | noncore/settings/networksettings2/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/main.cpp b/noncore/settings/networksettings2/main.cpp index 9004d19..18bf652 100644 --- a/noncore/settings/networksettings2/main.cpp +++ b/noncore/settings/networksettings2/main.cpp | |||
@@ -67,49 +67,49 @@ int main( int argc, char * argv[] ) { | |||
67 | } | 67 | } |
68 | 68 | ||
69 | // Start Qt | 69 | // Start Qt |
70 | #ifdef _WS_QWS_ | 70 | #ifdef _WS_QWS_ |
71 | // because QPEApplication does not handle GuiType well | 71 | // because QPEApplication does not handle GuiType well |
72 | if( GuiType == QApplication::Tty ) { | 72 | if( GuiType == QApplication::Tty ) { |
73 | // this cast is NOT correct but we do not use | 73 | // this cast is NOT correct but we do not use |
74 | // TheApp anymore ... | 74 | // TheApp anymore ... |
75 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); | 75 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); |
76 | } else { | 76 | } else { |
77 | TheApp = new QPEApplication( argc, argv, GuiType ); | 77 | TheApp = new QPEApplication( argc, argv, GuiType ); |
78 | } | 78 | } |
79 | #else | 79 | #else |
80 | TheApp = new QApplication( argc, argv, GuiType ); | 80 | TheApp = new QApplication( argc, argv, GuiType ); |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | // init qt with app widget | 83 | // init qt with app widget |
84 | 84 | ||
85 | switch( Action ) { | 85 | switch( Action ) { |
86 | case ACT_REQUEST : | 86 | case ACT_REQUEST : |
87 | { NetworkSettingsData NS; | 87 | { NetworkSettingsData NS; |
88 | if( NS.canStart( argv[1] ) ) { | 88 | if( NS.canStart( argv[1] ) ) { |
89 | QString S; | 89 | QString S; |
90 | S.sprintf( QPEApplication::qpeDir()+ | 90 | S.sprintf( QPEApplication::qpeDir()+ |
91 | "/bin/networksettings2" ); | 91 | "bin/networksettings2" ); |
92 | char * MyArgv[4]; | 92 | char * MyArgv[4]; |
93 | MyArgv[0] = "networksettings2"; | 93 | MyArgv[0] = "networksettings2"; |
94 | MyArgv[1] = "--prompt"; | 94 | MyArgv[1] = "--prompt"; |
95 | MyArgv[2] = argv[1]; | 95 | MyArgv[2] = argv[1]; |
96 | MyArgv[3] = NULL; | 96 | MyArgv[3] = NULL; |
97 | NSResources->system().execAsUser( S, MyArgv ); | 97 | NSResources->system().execAsUser( S, MyArgv ); |
98 | Log(("FAILED %s-cNN-allowed\n", argv[1] )); | 98 | Log(("FAILED %s-cNN-allowed\n", argv[1] )); |
99 | // if we come here , failed | 99 | // if we come here , failed |
100 | printf( "%s-cNN-disallowed", argv[1] ); | 100 | printf( "%s-cNN-disallowed", argv[1] ); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | break; | 103 | break; |
104 | case ACT_REGEN : | 104 | case ACT_REGEN : |
105 | { NetworkSettingsData NS; | 105 | { NetworkSettingsData NS; |
106 | // regen returns 0 if OK | 106 | // regen returns 0 if OK |
107 | rv = (NS.regenerate()) ? 1 : 0; | 107 | rv = (NS.regenerate()) ? 1 : 0; |
108 | } | 108 | } |
109 | break; | 109 | break; |
110 | case ACT_PROMPT : | 110 | case ACT_PROMPT : |
111 | { ActivateProfile AP(argv[1]); | 111 | { ActivateProfile AP(argv[1]); |
112 | if( AP.exec() == QDialog::Accepted ) { | 112 | if( AP.exec() == QDialog::Accepted ) { |
113 | Log(("%s-c%ld-allowed\n", | 113 | Log(("%s-c%ld-allowed\n", |
114 | argv[1], AP.selectedProfile() )); | 114 | argv[1], AP.selectedProfile() )); |
115 | printf( "%s-c%ld-allowed", argv[1], AP.selectedProfile() ); | 115 | printf( "%s-c%ld-allowed", argv[1], AP.selectedProfile() ); |