-rw-r--r-- | noncore/apps/zsafe/config.in | 2 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 85 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.pro | 2 |
3 files changed, 85 insertions, 4 deletions
diff --git a/noncore/apps/zsafe/config.in b/noncore/apps/zsafe/config.in index 53956ad..4b1e968 100644 --- a/noncore/apps/zsafe/config.in +++ b/noncore/apps/zsafe/config.in | |||
@@ -1,5 +1,5 @@ | |||
1 | config ZSAFE | 1 | config ZSAFE |
2 | boolean "zsafe (Zaurus Password Manager)" | 2 | boolean "zsafe (Zaurus Password Manager)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE |
5 | 5 | ||
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index bd03031..abf6511 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -1,76 +1,81 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** | 2 | ** |
3 | ** Created: Sat Apr 6 17:57:45 2002 | 3 | ** Created: Sat Apr 6 17:57:45 2002 |
4 | ** | 4 | ** |
5 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> | 5 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> |
6 | ** | 6 | ** |
7 | ** $Id$ | 7 | ** $Id$ |
8 | ** | 8 | ** |
9 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html | 9 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html |
10 | ** | 10 | ** |
11 | ** Compile Flags: | 11 | ** Compile Flags: |
12 | ** Zaurus arm : none | 12 | ** Zaurus arm : -DNO_OPIE |
13 | ** Zaurus Opie arm: none | ||
13 | ** Linux Desktop : -DDESKTOP | 14 | ** Linux Desktop : -DDESKTOP |
14 | ** Windows Desktop: -DDESKTOP -DWIN32 | 15 | ** Windows Desktop: -DDESKTOP -DWIN32 |
15 | ** | 16 | ** |
16 | ****************************************************************************/ | 17 | ****************************************************************************/ |
17 | #include "zsafe.h" | 18 | #include "zsafe.h" |
18 | #include "newdialog.h" | 19 | #include "newdialog.h" |
19 | #include "searchdialog.h" | 20 | #include "searchdialog.h" |
20 | #include "categorydialog.h" | 21 | #include "categorydialog.h" |
21 | #include "passworddialog.h" | 22 | #include "passworddialog.h" |
22 | #include "infoform.h" | 23 | #include "infoform.h" |
23 | #include "zlistview.h" | 24 | #include "zlistview.h" |
24 | #include "shadedlistitem.h" | 25 | #include "shadedlistitem.h" |
25 | 26 | ||
26 | #ifndef DESKTOP | 27 | #ifndef DESKTOP |
28 | #ifndef NO_OPIE | ||
29 | #include <opie/ofiledialog.h> | ||
30 | #else | ||
27 | #include "scqtfileedit.h" | 31 | #include "scqtfileedit.h" |
28 | #endif | 32 | #endif |
33 | #endif | ||
29 | 34 | ||
30 | #include <qclipboard.h> | 35 | #include <qclipboard.h> |
31 | 36 | ||
32 | #include <stdio.h> | 37 | #include <stdio.h> |
33 | 38 | ||
34 | #include <sys/types.h> | 39 | #include <sys/types.h> |
35 | #include <sys/stat.h> | 40 | #include <sys/stat.h> |
36 | #include <fcntl.h> | 41 | #include <fcntl.h> |
37 | #include <stdlib.h> | 42 | #include <stdlib.h> |
38 | #ifndef WIN32 | 43 | #ifndef WIN32 |
39 | #include <unistd.h> | 44 | #include <unistd.h> |
40 | #endif | 45 | #endif |
41 | #include <string.h> | 46 | #include <string.h> |
42 | #include <errno.h> | 47 | #include <errno.h> |
43 | 48 | ||
44 | #include <qmenubar.h> | 49 | #include <qmenubar.h> |
45 | #include <qpopupmenu.h> | 50 | #include <qpopupmenu.h> |
46 | 51 | ||
47 | #ifdef DESKTOP | 52 | #ifdef DESKTOP |
48 | #include <qfiledialog.h> | 53 | #include <qfiledialog.h> |
49 | #ifndef WIN32 | 54 | #ifndef WIN32 |
50 | #include <qsettings.h> | 55 | #include <qsettings.h> |
51 | #else | 56 | #else |
52 | #include "qsettings.h" | 57 | #include "qsettings.h" |
53 | #endif | 58 | #endif |
54 | #include <qapplication.h> | 59 | #include <qapplication.h> |
55 | #else | 60 | #else |
56 | #include <qfile.h> | 61 | #include <qfile.h> |
57 | #include <qpe/fileselector.h> | 62 | #include <qpe/fileselector.h> |
58 | #include <qpe/global.h> | 63 | #include <qpe/global.h> |
59 | #include <qpe/qpeapplication.h> | 64 | #include <qpe/qpeapplication.h> |
60 | #include <qpe/resource.h> | 65 | #include <qpe/resource.h> |
61 | #include <qpe/config.h> | 66 | #include <qpe/config.h> |
62 | #endif | 67 | #endif |
63 | 68 | ||
64 | #include <qtimer.h> | 69 | #include <qtimer.h> |
65 | #include <qlayout.h> | 70 | #include <qlayout.h> |
66 | #include <qmessagebox.h> | 71 | #include <qmessagebox.h> |
67 | #include <qfile.h> | 72 | #include <qfile.h> |
68 | #include <qtextstream.h> | 73 | #include <qtextstream.h> |
69 | #include <qheader.h> | 74 | #include <qheader.h> |
70 | #include <qlistview.h> | 75 | #include <qlistview.h> |
71 | #include <qtoolbutton.h> | 76 | #include <qtoolbutton.h> |
72 | #include <qlayout.h> | 77 | #include <qlayout.h> |
73 | #include <qvariant.h> | 78 | #include <qvariant.h> |
74 | #include <qtooltip.h> | 79 | #include <qtooltip.h> |
75 | #include <qwhatsthis.h> | 80 | #include <qwhatsthis.h> |
76 | #include <qimage.h> | 81 | #include <qimage.h> |
@@ -1150,233 +1155,272 @@ void ZSafe::showInfo( QListViewItem *_item) | |||
1150 | // text += "<br>"; | 1155 | // text += "<br>"; |
1151 | } | 1156 | } |
1152 | 1157 | ||
1153 | text += "</body></html>"; | 1158 | text += "</body></html>"; |
1154 | 1159 | ||
1155 | infoForm->InfoText->setText(text); | 1160 | infoForm->InfoText->setText(text); |
1156 | infoForm->hide(); | 1161 | infoForm->hide(); |
1157 | #ifdef DESKTOP | 1162 | #ifdef DESKTOP |
1158 | infoForm->show(); | 1163 | infoForm->show(); |
1159 | #else | 1164 | #else |
1160 | infoForm->showMaximized(); | 1165 | infoForm->showMaximized(); |
1161 | #endif | 1166 | #endif |
1162 | 1167 | ||
1163 | } | 1168 | } |
1164 | } | 1169 | } |
1165 | 1170 | ||
1166 | void ZSafe::listViewSelected( QListViewItem *_item) | 1171 | void ZSafe::listViewSelected( QListViewItem *_item) |
1167 | { | 1172 | { |
1168 | if (!_item) | 1173 | if (!_item) |
1169 | return; | 1174 | return; |
1170 | if (selectedItem != NULL) | 1175 | if (selectedItem != NULL) |
1171 | selectedItem->setSelected(FALSE); | 1176 | selectedItem->setSelected(FALSE); |
1172 | 1177 | ||
1173 | selectedItem = _item; | 1178 | selectedItem = _item; |
1174 | 1179 | ||
1175 | #ifndef DESKTOP | 1180 | #ifndef DESKTOP |
1176 | // set the column text dependent on the selected item | 1181 | // set the column text dependent on the selected item |
1177 | ListView->setColumnText(0, getFieldLabel (selectedItem, "1", tr("Name"))); | 1182 | ListView->setColumnText(0, getFieldLabel (selectedItem, "1", tr("Name"))); |
1178 | ListView->setColumnText(1, getFieldLabel (selectedItem, "2", tr("Field 2"))); | 1183 | ListView->setColumnText(1, getFieldLabel (selectedItem, "2", tr("Field 2"))); |
1179 | ListView->setColumnText(2, getFieldLabel (selectedItem, "3", tr("Field 3"))); | 1184 | ListView->setColumnText(2, getFieldLabel (selectedItem, "3", tr("Field 3"))); |
1180 | ListView->setColumnText(3, getFieldLabel (selectedItem, "4", tr("Comment"))); | 1185 | ListView->setColumnText(3, getFieldLabel (selectedItem, "4", tr("Comment"))); |
1181 | ListView->setColumnText(4, getFieldLabel (selectedItem, "5", tr("Field 4"))); | 1186 | ListView->setColumnText(4, getFieldLabel (selectedItem, "5", tr("Field 4"))); |
1182 | ListView->setColumnText(5, getFieldLabel (selectedItem, "6", tr("Field 5"))); | 1187 | ListView->setColumnText(5, getFieldLabel (selectedItem, "6", tr("Field 5"))); |
1183 | #endif | 1188 | #endif |
1184 | #ifdef WIN32 | 1189 | #ifdef WIN32 |
1185 | // set the column text dependent on the selected item | 1190 | // set the column text dependent on the selected item |
1186 | ListView->setColumnText(0, getFieldLabel (selectedItem, "1", tr("Name"))); | 1191 | ListView->setColumnText(0, getFieldLabel (selectedItem, "1", tr("Name"))); |
1187 | ListView->setColumnText(1, getFieldLabel (selectedItem, "2", tr("Field 2"))); | 1192 | ListView->setColumnText(1, getFieldLabel (selectedItem, "2", tr("Field 2"))); |
1188 | ListView->setColumnText(2, getFieldLabel (selectedItem, "3", tr("Field 3"))); | 1193 | ListView->setColumnText(2, getFieldLabel (selectedItem, "3", tr("Field 3"))); |
1189 | ListView->setColumnText(3, getFieldLabel (selectedItem, "4", tr("Comment"))); | 1194 | ListView->setColumnText(3, getFieldLabel (selectedItem, "4", tr("Comment"))); |
1190 | ListView->setColumnText(4, getFieldLabel (selectedItem, "5", tr("Field 4"))); | 1195 | ListView->setColumnText(4, getFieldLabel (selectedItem, "5", tr("Field 4"))); |
1191 | ListView->setColumnText(5, getFieldLabel (selectedItem, "6", tr("Field 5"))); | 1196 | ListView->setColumnText(5, getFieldLabel (selectedItem, "6", tr("Field 5"))); |
1192 | #endif | 1197 | #endif |
1193 | 1198 | ||
1194 | } | 1199 | } |
1195 | 1200 | ||
1196 | bool ZSafe::isCategory(QListViewItem *_item) | 1201 | bool ZSafe::isCategory(QListViewItem *_item) |
1197 | { | 1202 | { |
1203 | if (_item == NULL) | ||
1204 | return FALSE; | ||
1205 | |||
1198 | QString categoryName = _item->text (0); | 1206 | QString categoryName = _item->text (0); |
1199 | if (categories.find ((const char *)categoryName)) | 1207 | if (categories.find ((const char *)categoryName)) |
1200 | return TRUE; | 1208 | return TRUE; |
1201 | else | 1209 | else |
1202 | return FALSE; | 1210 | return FALSE; |
1203 | } | 1211 | } |
1204 | 1212 | ||
1205 | void ZSafe::removeAsciiFile() | 1213 | void ZSafe::removeAsciiFile() |
1206 | { | 1214 | { |
1207 | // QString fn = filename + ".txt"; | 1215 | // QString fn = filename + ".txt"; |
1208 | // open the file dialog | 1216 | // open the file dialog |
1209 | #ifndef DESKTOP | 1217 | #ifndef DESKTOP |
1218 | #ifndef NO_OPIE | ||
1219 | QMap<QString, QStringList> mimeTypes; | ||
1220 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1221 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1222 | QString fn = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
1223 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1224 | QString::null, | ||
1225 | mimeTypes, | ||
1226 | this, | ||
1227 | tr ("Remove text file")); | ||
1228 | #else | ||
1210 | QString fn = ScQtFileEdit::getOpenFileName(this, | 1229 | QString fn = ScQtFileEdit::getOpenFileName(this, |
1211 | tr ("Remove text file"), | 1230 | tr ("Remove text file"), |
1212 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1231 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1213 | "*.txt"); | 1232 | "*.txt"); |
1233 | #endif | ||
1214 | #else | 1234 | #else |
1215 | QString fn = QFileDialog::getOpenFileName( | 1235 | QString fn = QFileDialog::getOpenFileName( |
1216 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1236 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1217 | "ZSafe (*.txt)", | 1237 | "ZSafe (*.txt)", |
1218 | this, | 1238 | this, |
1219 | "ZSafe File Dialog" | 1239 | "ZSafe File Dialog" |
1220 | "Choose a text file" ); | 1240 | "Choose a text file" ); |
1221 | #endif | 1241 | #endif |
1222 | 1242 | ||
1223 | if (fn && fn.length() > 0 ) | 1243 | if (fn && fn.length() > 0 ) |
1224 | { | 1244 | { |
1225 | QFile f( fn ); | 1245 | QFile f( fn ); |
1226 | if ( !f.remove() ) | 1246 | if ( !f.remove() ) |
1227 | { | 1247 | { |
1228 | qWarning( QString("Could not remove file %1").arg(fn), | 1248 | qWarning( QString("Could not remove file %1").arg(fn), |
1229 | 2000 ); | 1249 | 2000 ); |
1230 | QMessageBox::critical( 0, tr("ZSafe"), | 1250 | QMessageBox::critical( 0, tr("ZSafe"), |
1231 | tr("Could not remove text file.") ); | 1251 | tr("Could not remove text file.") ); |
1232 | return; | 1252 | return; |
1233 | } | 1253 | } |
1234 | } | 1254 | } |
1235 | } | 1255 | } |
1236 | 1256 | ||
1237 | void ZSafe::writeAllEntries() | 1257 | void ZSafe::writeAllEntries() |
1238 | { | 1258 | { |
1239 | if (filename.isEmpty()) | 1259 | if (filename.isEmpty()) |
1240 | { | 1260 | { |
1241 | QMessageBox::critical( 0, tr("ZSafe"), | 1261 | QMessageBox::critical( 0, tr("ZSafe"), |
1242 | tr("No document defined.\nYou have to create a new document")); | 1262 | tr("No document defined.\nYou have to create a new document")); |
1243 | return; | 1263 | return; |
1244 | } | 1264 | } |
1245 | 1265 | ||
1246 | // open the file dialog | 1266 | // open the file dialog |
1247 | #ifndef DESKTOP | 1267 | #ifndef DESKTOP |
1268 | #ifndef NO_OPIE | ||
1269 | QMap<QString, QStringList> mimeTypes; | ||
1270 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1271 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1272 | QString fn = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
1273 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1274 | QString::null, | ||
1275 | mimeTypes, | ||
1276 | this, | ||
1277 | tr ("Export text file")); | ||
1278 | #else | ||
1248 | QString fn = ScQtFileEdit::getSaveAsFileName(this, | 1279 | QString fn = ScQtFileEdit::getSaveAsFileName(this, |
1249 | tr ("Export text file"), | 1280 | tr ("Export text file"), |
1250 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1281 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1251 | "*.txt"); | 1282 | "*.txt"); |
1283 | #endif | ||
1252 | #else | 1284 | #else |
1253 | QString fn = QFileDialog::getSaveFileName( | 1285 | QString fn = QFileDialog::getSaveFileName( |
1254 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1286 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1255 | "ZSafe (*.txt)", | 1287 | "ZSafe (*.txt)", |
1256 | this, | 1288 | this, |
1257 | "ZSafe File Dialog" | 1289 | "ZSafe File Dialog" |
1258 | "Choose a text file" ); | 1290 | "Choose a text file" ); |
1259 | #endif | 1291 | #endif |
1260 | 1292 | ||
1261 | // open the new document | 1293 | // open the new document |
1262 | if (fn && fn.length() > 0 ) | 1294 | if (fn && fn.length() > 0 ) |
1263 | { | 1295 | { |
1264 | QFile f( fn ); | 1296 | QFile f( fn ); |
1265 | if ( !f.open( IO_WriteOnly ) ) { | 1297 | if ( !f.open( IO_WriteOnly ) ) { |
1266 | qWarning( QString("Could not write to file %1").arg(fn), | 1298 | qWarning( QString("Could not write to file %1").arg(fn), |
1267 | 2000 ); | 1299 | 2000 ); |
1268 | QMessageBox::critical( 0, "ZSafe", | 1300 | QMessageBox::critical( 0, "ZSafe", |
1269 | QString("Could not export to text file.") ); | 1301 | QString("Could not export to text file.") ); |
1270 | return; | 1302 | return; |
1271 | } | 1303 | } |
1272 | QTextStream t( &f ); | 1304 | QTextStream t( &f ); |
1273 | 1305 | ||
1274 | QListViewItem *i; | 1306 | QListViewItem *i; |
1275 | // step through all categories | 1307 | // step through all categories |
1276 | for (i = ListView->firstChild(); | 1308 | for (i = ListView->firstChild(); |
1277 | i != NULL; | 1309 | i != NULL; |
1278 | i = i->nextSibling()) | 1310 | i = i->nextSibling()) |
1279 | { | 1311 | { |
1280 | // step through all subitems | 1312 | // step through all subitems |
1281 | QListViewItem *si; | 1313 | QListViewItem *si; |
1282 | for (si = i->firstChild(); | 1314 | for (si = i->firstChild(); |
1283 | si != NULL; | 1315 | si != NULL; |
1284 | si = si->nextSibling()) | 1316 | si = si->nextSibling()) |
1285 | { | 1317 | { |
1286 | QString oneEntry; | 1318 | QString oneEntry; |
1287 | oneEntry += "\""; | 1319 | oneEntry += "\""; |
1288 | oneEntry += i->text(0); | 1320 | oneEntry += i->text(0); |
1289 | oneEntry += "\";"; | 1321 | oneEntry += "\";"; |
1290 | oneEntry += "\""; | 1322 | oneEntry += "\""; |
1291 | oneEntry += si->text(0); | 1323 | oneEntry += si->text(0); |
1292 | oneEntry += "\";"; | 1324 | oneEntry += "\";"; |
1293 | oneEntry += "\""; | 1325 | oneEntry += "\""; |
1294 | oneEntry += si->text(1); | 1326 | oneEntry += si->text(1); |
1295 | oneEntry += "\";"; | 1327 | oneEntry += "\";"; |
1296 | oneEntry += "\""; | 1328 | oneEntry += "\""; |
1297 | oneEntry += si->text(2); | 1329 | oneEntry += si->text(2); |
1298 | oneEntry += "\";"; | 1330 | oneEntry += "\";"; |
1299 | oneEntry += "\""; | 1331 | oneEntry += "\""; |
1300 | QString comment = si->text(3); | 1332 | QString comment = si->text(3); |
1301 | comment.replace (QRegExp("\n"), "<br>"); | 1333 | comment.replace (QRegExp("\n"), "<br>"); |
1302 | oneEntry += comment; | 1334 | oneEntry += comment; |
1303 | oneEntry += "\";"; | 1335 | oneEntry += "\";"; |
1304 | oneEntry += "\""; | 1336 | oneEntry += "\""; |
1305 | oneEntry += si->text(4); | 1337 | oneEntry += si->text(4); |
1306 | oneEntry += "\";"; | 1338 | oneEntry += "\";"; |
1307 | oneEntry += "\""; | 1339 | oneEntry += "\""; |
1308 | oneEntry += si->text(5); | 1340 | oneEntry += si->text(5); |
1309 | oneEntry += "\""; | 1341 | oneEntry += "\""; |
1310 | // qWarning (oneEntry); | 1342 | // qWarning (oneEntry); |
1311 | t << oneEntry << endl; | 1343 | t << oneEntry << endl; |
1312 | 1344 | ||
1313 | // qWarning (si->text(0)); | 1345 | // qWarning (si->text(0)); |
1314 | } | 1346 | } |
1315 | } | 1347 | } |
1316 | f.close(); | 1348 | f.close(); |
1317 | } | 1349 | } |
1318 | } | 1350 | } |
1319 | 1351 | ||
1320 | void ZSafe::readAllEntries() | 1352 | void ZSafe::readAllEntries() |
1321 | { | 1353 | { |
1322 | if (filename.isEmpty()) | 1354 | if (filename.isEmpty()) |
1323 | { | 1355 | { |
1324 | QMessageBox::critical( 0, tr("ZSafe"), | 1356 | QMessageBox::critical( 0, tr("ZSafe"), |
1325 | tr("No document defined.\nYou have to create a new document")); | 1357 | tr("No document defined.\nYou have to create a new document")); |
1326 | return; | 1358 | return; |
1327 | } | 1359 | } |
1328 | 1360 | ||
1329 | // open the file dialog | 1361 | // open the file dialog |
1330 | #ifndef DESKTOP | 1362 | #ifndef DESKTOP |
1363 | #ifndef NO_OPIE | ||
1364 | QMap<QString, QStringList> mimeTypes; | ||
1365 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1366 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1367 | QString fn = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
1368 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1369 | QString::null, | ||
1370 | mimeTypes, | ||
1371 | this, | ||
1372 | tr ("Import text file")); | ||
1373 | #else | ||
1331 | QString fn = ScQtFileEdit::getOpenFileName(this, | 1374 | QString fn = ScQtFileEdit::getOpenFileName(this, |
1332 | tr ("Import text file"), | 1375 | tr ("Import text file"), |
1333 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1376 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1334 | "*.txt"); | 1377 | "*.txt"); |
1378 | #endif | ||
1335 | #else | 1379 | #else |
1336 | QString fn = QFileDialog::getOpenFileName( | 1380 | QString fn = QFileDialog::getOpenFileName( |
1337 | QDir::homeDirPath() + "/Documents/application/zsafe", | 1381 | QDir::homeDirPath() + "/Documents/application/zsafe", |
1338 | "ZSafe (*.txt)", | 1382 | "ZSafe (*.txt)", |
1339 | this, | 1383 | this, |
1340 | "ZSafe File Dialog" | 1384 | "ZSafe File Dialog" |
1341 | "Choose a text file" ); | 1385 | "Choose a text file" ); |
1342 | #endif | 1386 | #endif |
1343 | 1387 | ||
1344 | if (fn && fn.length() > 0 ) | 1388 | if (fn && fn.length() > 0 ) |
1345 | { | 1389 | { |
1346 | QFile f( fn ); | 1390 | QFile f( fn ); |
1347 | if ( !f.open( IO_ReadOnly ) ) | 1391 | if ( !f.open( IO_ReadOnly ) ) |
1348 | { | 1392 | { |
1349 | qWarning( QString("Could not read file %1").arg(fn), | 1393 | qWarning( QString("Could not read file %1").arg(fn), |
1350 | 2000 ); | 1394 | 2000 ); |
1351 | QMessageBox::critical( 0, "ZSafe", | 1395 | QMessageBox::critical( 0, "ZSafe", |
1352 | QString("Could not import text file.") ); | 1396 | QString("Could not import text file.") ); |
1353 | return; | 1397 | return; |
1354 | } | 1398 | } |
1355 | 1399 | ||
1356 | modified = true; | 1400 | modified = true; |
1357 | 1401 | ||
1358 | // clear the password list | 1402 | // clear the password list |
1359 | selectedItem = NULL; | 1403 | selectedItem = NULL; |
1360 | QListViewItem *i; | 1404 | QListViewItem *i; |
1361 | // step through all categories | 1405 | // step through all categories |
1362 | for (i = ListView->firstChild(); | 1406 | for (i = ListView->firstChild(); |
1363 | i != NULL; | 1407 | i != NULL; |
1364 | i = i->nextSibling()) | 1408 | i = i->nextSibling()) |
1365 | { | 1409 | { |
1366 | // step through all subitems | 1410 | // step through all subitems |
1367 | QListViewItem *si; | 1411 | QListViewItem *si; |
1368 | for (si = i->firstChild(); | 1412 | for (si = i->firstChild(); |
1369 | si != NULL; ) | 1413 | si != NULL; ) |
1370 | // si = si->nextSibling()) | 1414 | // si = si->nextSibling()) |
1371 | { | 1415 | { |
1372 | QListViewItem *_si = si; | 1416 | QListViewItem *_si = si; |
1373 | si = si->nextSibling(); | 1417 | si = si->nextSibling(); |
1374 | i->takeItem(_si); // remove from view list | 1418 | i->takeItem(_si); // remove from view list |
1375 | if (_si) delete _si; | 1419 | if (_si) delete _si; |
1376 | } | 1420 | } |
1377 | } | 1421 | } |
1378 | 1422 | ||
1379 | qWarning ("ReadAllEntries(): "); | 1423 | qWarning ("ReadAllEntries(): "); |
1380 | 1424 | ||
1381 | QTextStream t(&f); | 1425 | QTextStream t(&f); |
1382 | while ( !t.eof() ) | 1426 | while ( !t.eof() ) |
@@ -3096,259 +3140,296 @@ void ZSafe::pasteItem() | |||
3096 | { | 3140 | { |
3097 | modified = true; | 3141 | modified = true; |
3098 | if (IsCut) | 3142 | if (IsCut) |
3099 | { | 3143 | { |
3100 | if (copiedItem) | 3144 | if (copiedItem) |
3101 | { | 3145 | { |
3102 | // add the new item | 3146 | // add the new item |
3103 | QListViewItem *i = new ShadedListItem (0, selectedItem); | 3147 | QListViewItem *i = new ShadedListItem (0, selectedItem); |
3104 | // i->setOpen (TRUE); | 3148 | // i->setOpen (TRUE); |
3105 | i->setText (0, copiedItem->text(0)); | 3149 | i->setText (0, copiedItem->text(0)); |
3106 | i->setText (1, copiedItem->text(1)); | 3150 | i->setText (1, copiedItem->text(1)); |
3107 | i->setText (2, copiedItem->text(2)); | 3151 | i->setText (2, copiedItem->text(2)); |
3108 | i->setText (3, copiedItem->text(3)); | 3152 | i->setText (3, copiedItem->text(3)); |
3109 | i->setText (4, copiedItem->text(4)); | 3153 | i->setText (4, copiedItem->text(4)); |
3110 | i->setText (5, copiedItem->text(5)); | 3154 | i->setText (5, copiedItem->text(5)); |
3111 | selectedItem->setOpen( TRUE ); | 3155 | selectedItem->setOpen( TRUE ); |
3112 | 3156 | ||
3113 | // remove the cutted item | 3157 | // remove the cutted item |
3114 | copiedItem->parent()->takeItem(copiedItem); | 3158 | copiedItem->parent()->takeItem(copiedItem); |
3115 | selectedItem = NULL; | 3159 | selectedItem = NULL; |
3116 | } | 3160 | } |
3117 | } | 3161 | } |
3118 | else if (IsCopy) | 3162 | else if (IsCopy) |
3119 | { | 3163 | { |
3120 | if (copiedItem) | 3164 | if (copiedItem) |
3121 | { | 3165 | { |
3122 | // add the new item | 3166 | // add the new item |
3123 | QListViewItem *i = new ShadedListItem (0, selectedItem); | 3167 | QListViewItem *i = new ShadedListItem (0, selectedItem); |
3124 | // i->setOpen (TRUE); | 3168 | // i->setOpen (TRUE); |
3125 | i->setText (0, copiedItem->text(0)); | 3169 | i->setText (0, copiedItem->text(0)); |
3126 | i->setText (1, copiedItem->text(1)); | 3170 | i->setText (1, copiedItem->text(1)); |
3127 | i->setText (2, copiedItem->text(2)); | 3171 | i->setText (2, copiedItem->text(2)); |
3128 | i->setText (3, copiedItem->text(3)); | 3172 | i->setText (3, copiedItem->text(3)); |
3129 | i->setText (4, copiedItem->text(4)); | 3173 | i->setText (4, copiedItem->text(4)); |
3130 | i->setText (5, copiedItem->text(5)); | 3174 | i->setText (5, copiedItem->text(5)); |
3131 | selectedItem->setOpen( TRUE ); | 3175 | selectedItem->setOpen( TRUE ); |
3132 | } | 3176 | } |
3133 | } | 3177 | } |
3134 | } | 3178 | } |
3135 | IsCut = false; | 3179 | IsCut = false; |
3136 | IsCopy = false; | 3180 | IsCopy = false; |
3137 | } | 3181 | } |
3138 | 3182 | ||
3139 | void ZSafe::newDocument() | 3183 | void ZSafe::newDocument() |
3140 | { | 3184 | { |
3141 | 3185 | ||
3142 | // open the file dialog | 3186 | // open the file dialog |
3143 | #ifndef DESKTOP | 3187 | #ifndef DESKTOP |
3188 | #ifndef NO_OPIE | ||
3189 | QMap<QString, QStringList> mimeTypes; | ||
3190 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3191 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3192 | QString newFile = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
3193 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3194 | QString::null, | ||
3195 | mimeTypes, | ||
3196 | this, | ||
3197 | tr ("Create new ZSafe document")); | ||
3198 | #else | ||
3144 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, | 3199 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, |
3145 | tr ("Create new ZSafe document"), | 3200 | tr ("Create new ZSafe document"), |
3146 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3201 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3147 | "*.zsf"); | 3202 | "*.zsf"); |
3203 | #endif | ||
3148 | #else | 3204 | #else |
3149 | QString newFile = QFileDialog::getSaveFileName( | 3205 | QString newFile = QFileDialog::getSaveFileName( |
3150 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3206 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3151 | "ZSafe (*.zsf)", | 3207 | "ZSafe (*.zsf)", |
3152 | this, | 3208 | this, |
3153 | "ZSafe File Dialog" | 3209 | "ZSafe File Dialog" |
3154 | "Choose a ZSafe file" ); | 3210 | "Choose a ZSafe file" ); |
3155 | #endif | 3211 | #endif |
3156 | 3212 | ||
3157 | // open the new document | 3213 | // open the new document |
3158 | if (newFile && newFile.length() > 0 ) | 3214 | if (newFile && newFile.length() > 0 ) |
3159 | { | 3215 | { |
3160 | // save the previous opened document | 3216 | // save the previous opened document |
3161 | if (!filename.isEmpty()) | 3217 | if (!filename.isEmpty()) |
3162 | saveDocument(filename, FALSE); | 3218 | saveDocument(filename, FALSE); |
3163 | 3219 | ||
3164 | modified = true; | 3220 | modified = true; |
3165 | 3221 | ||
3166 | // clear the password list | 3222 | // clear the password list |
3167 | QListViewItem *i; | 3223 | QListViewItem *i; |
3168 | QListViewItem *c = NULL; | 3224 | QListViewItem *c = NULL; |
3169 | // step through all categories | 3225 | // step through all categories |
3170 | for (i = ListView->firstChild(); | 3226 | for (i = ListView->firstChild(); |
3171 | i != NULL; | 3227 | i != NULL; |
3172 | i = i->nextSibling()) | 3228 | i = i->nextSibling()) |
3173 | { | 3229 | { |
3174 | if (c) delete c; // delete the previous category | 3230 | if (c) delete c; // delete the previous category |
3175 | 3231 | ||
3176 | c = i; | 3232 | c = i; |
3177 | // step through all subitems | 3233 | // step through all subitems |
3178 | QListViewItem *si; | 3234 | QListViewItem *si; |
3179 | for (si = i->firstChild(); | 3235 | for (si = i->firstChild(); |
3180 | si != NULL; ) | 3236 | si != NULL; ) |
3181 | { | 3237 | { |
3182 | QListViewItem *_si = si; | 3238 | QListViewItem *_si = si; |
3183 | si = si->nextSibling(); | 3239 | si = si->nextSibling(); |
3184 | i->takeItem(_si); // remove from view list | 3240 | i->takeItem(_si); // remove from view list |
3185 | if (_si) delete _si; | 3241 | if (_si) delete _si; |
3186 | } | 3242 | } |
3187 | } | 3243 | } |
3188 | if (c) delete c; // delete the previous category | 3244 | if (c) delete c; // delete the previous category |
3189 | categories.clear(); | 3245 | categories.clear(); |
3190 | 3246 | ||
3191 | // m_password = ""; | 3247 | // m_password = ""; |
3192 | // selectedItem = NULL; | 3248 | selectedItem = NULL; |
3193 | 3249 | ||
3194 | filename = newFile; | 3250 | filename = newFile; |
3195 | 3251 | ||
3196 | // save the current filename to the config file | 3252 | // save the current filename to the config file |
3197 | conf->writeEntry(APP_KEY+"document", filename); | 3253 | conf->writeEntry(APP_KEY+"document", filename); |
3198 | saveConf(); | 3254 | saveConf(); |
3199 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); | 3255 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); |
3200 | #ifdef WIN32 | 3256 | #ifdef WIN32 |
3201 | this->setCaption("Qt ZSafe: " + ti); | 3257 | this->setCaption("Qt ZSafe: " + ti); |
3202 | #else | 3258 | #else |
3203 | this->setCaption("ZSafe: " + ti); | 3259 | this->setCaption("ZSafe: " + ti); |
3204 | #endif | 3260 | #endif |
3205 | 3261 | ||
3206 | // openDocument(filename); | 3262 | // openDocument(filename); |
3207 | 3263 | ||
3208 | QMessageBox::information( this, tr("ZSafe"), | 3264 | QMessageBox::information( this, tr("ZSafe"), |
3209 | tr("Now you have to enter\na password twice for your\nnewly created document."), tr("&OK"), 0); | 3265 | tr("Now you have to enter\na password twice for your\nnewly created document."), tr("&OK"), 0); |
3210 | 3266 | ||
3211 | saveDocumentWithPwd(); | 3267 | saveDocumentWithPwd(); |
3212 | } | 3268 | } |
3213 | } | 3269 | } |
3214 | 3270 | ||
3215 | void ZSafe::loadDocument() | 3271 | void ZSafe::loadDocument() |
3216 | { | 3272 | { |
3217 | 3273 | ||
3218 | // open the file dialog | 3274 | // open the file dialog |
3219 | #ifndef DESKTOP | 3275 | #ifndef DESKTOP |
3276 | #ifndef NO_OPIE | ||
3277 | QMap<QString, QStringList> mimeTypes; | ||
3278 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3279 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3280 | QString newFile = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
3281 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3282 | QString::null, | ||
3283 | mimeTypes, | ||
3284 | this, | ||
3285 | tr ("Open ZSafe document")); | ||
3286 | #else | ||
3220 | QString newFile = ScQtFileEdit::getOpenFileName(this, | 3287 | QString newFile = ScQtFileEdit::getOpenFileName(this, |
3221 | tr ("Open ZSafe document"), | 3288 | tr ("Open ZSafe document"), |
3222 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3289 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3223 | "*.zsf"); | 3290 | "*.zsf"); |
3291 | #endif | ||
3224 | #else | 3292 | #else |
3225 | QString newFile = QFileDialog::getOpenFileName( | 3293 | QString newFile = QFileDialog::getOpenFileName( |
3226 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3294 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3227 | "ZSafe (*.zsf)", | 3295 | "ZSafe (*.zsf)", |
3228 | this, | 3296 | this, |
3229 | "ZSafe File Dialog" | 3297 | "ZSafe File Dialog" |
3230 | "Choose a ZSafe file" ); | 3298 | "Choose a ZSafe file" ); |
3231 | #endif | 3299 | #endif |
3232 | 3300 | ||
3233 | // open the new document | 3301 | // open the new document |
3234 | if (newFile && newFile.length() > 0 ) | 3302 | if (newFile && newFile.length() > 0 ) |
3235 | { | 3303 | { |
3236 | // save the previous opened document | 3304 | // save the previous opened document |
3237 | if (!filename.isEmpty()) | 3305 | if (!filename.isEmpty()) |
3238 | saveDocument(filename, FALSE); | 3306 | saveDocument(filename, FALSE); |
3239 | 3307 | ||
3240 | // clear the password list | 3308 | // clear the password list |
3241 | QListViewItem *i; | 3309 | QListViewItem *i; |
3242 | QListViewItem *c = NULL; | 3310 | QListViewItem *c = NULL; |
3243 | // step through all categories | 3311 | // step through all categories |
3244 | for (i = ListView->firstChild(); | 3312 | for (i = ListView->firstChild(); |
3245 | i != NULL; | 3313 | i != NULL; |
3246 | i = i->nextSibling()) | 3314 | i = i->nextSibling()) |
3247 | { | 3315 | { |
3248 | if (c) delete c; // delete the previous category | 3316 | if (c) delete c; // delete the previous category |
3249 | 3317 | ||
3250 | c = i; | 3318 | c = i; |
3251 | // step through all subitems | 3319 | // step through all subitems |
3252 | QListViewItem *si; | 3320 | QListViewItem *si; |
3253 | for (si = i->firstChild(); | 3321 | for (si = i->firstChild(); |
3254 | si != NULL; ) | 3322 | si != NULL; ) |
3255 | { | 3323 | { |
3256 | QListViewItem *_si = si; | 3324 | QListViewItem *_si = si; |
3257 | si = si->nextSibling(); | 3325 | si = si->nextSibling(); |
3258 | i->takeItem(_si); // remove from view list | 3326 | i->takeItem(_si); // remove from view list |
3259 | if (_si) delete _si; | 3327 | if (_si) delete _si; |
3260 | } | 3328 | } |
3261 | } | 3329 | } |
3262 | if (c) delete c; // delete the previous category | 3330 | if (c) delete c; // delete the previous category |
3263 | categories.clear(); | 3331 | categories.clear(); |
3264 | m_password = ""; | 3332 | m_password = ""; |
3265 | selectedItem = NULL; | 3333 | selectedItem = NULL; |
3266 | filename = newFile; | 3334 | filename = newFile; |
3267 | 3335 | ||
3268 | // save the current filename to the config file | 3336 | // save the current filename to the config file |
3269 | conf->writeEntry(APP_KEY+"document", filename); | 3337 | conf->writeEntry(APP_KEY+"document", filename); |
3270 | saveConf(); | 3338 | saveConf(); |
3271 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); | 3339 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); |
3272 | #ifdef WIN32 | 3340 | #ifdef WIN32 |
3273 | this->setCaption("Qt ZSafe: " + ti); | 3341 | this->setCaption("Qt ZSafe: " + ti); |
3274 | #else | 3342 | #else |
3275 | this->setCaption("ZSafe: " + ti); | 3343 | this->setCaption("ZSafe: " + ti); |
3276 | #endif | 3344 | #endif |
3277 | 3345 | ||
3278 | openDocument(filename); | 3346 | openDocument(filename); |
3279 | } | 3347 | } |
3280 | } | 3348 | } |
3281 | 3349 | ||
3282 | void ZSafe::saveDocumentAs() | 3350 | void ZSafe::saveDocumentAs() |
3283 | { | 3351 | { |
3284 | 3352 | ||
3285 | #ifndef DESKTOP | 3353 | #ifndef DESKTOP |
3354 | #ifndef NO_OPIE | ||
3355 | QMap<QString, QStringList> mimeTypes; | ||
3356 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3357 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3358 | QString newFile = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
3359 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3360 | QString::null, | ||
3361 | mimeTypes, | ||
3362 | this, | ||
3363 | tr ("Save ZSafe document as..")); | ||
3364 | #else | ||
3286 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, | 3365 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, |
3287 | tr ("Save ZSafe document as.."), | 3366 | tr ("Save ZSafe document as.."), |
3288 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3367 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3289 | "*.zsf"); | 3368 | "*.zsf"); |
3369 | #endif | ||
3290 | #else | 3370 | #else |
3291 | // open the file dialog | 3371 | // open the file dialog |
3292 | QString newFile = QFileDialog::getSaveFileName( | 3372 | QString newFile = QFileDialog::getSaveFileName( |
3293 | QDir::homeDirPath() + "/Documents/application/zsafe", | 3373 | QDir::homeDirPath() + "/Documents/application/zsafe", |
3294 | "ZSafe (*.zsf)", | 3374 | "ZSafe (*.zsf)", |
3295 | this, | 3375 | this, |
3296 | "ZSafe File Dialog" | 3376 | "ZSafe File Dialog" |
3297 | "Choose a ZSafe file" ); | 3377 | "Choose a ZSafe file" ); |
3298 | #endif | 3378 | #endif |
3299 | 3379 | ||
3300 | // open the new document | 3380 | // open the new document |
3301 | if (newFile && newFile.length() > 0 ) | 3381 | if (newFile && newFile.length() > 0 ) |
3302 | { | 3382 | { |
3303 | // save the previous opened document | 3383 | // save the previous opened document |
3304 | if (!filename.isEmpty()) | 3384 | if (!filename.isEmpty()) |
3305 | saveDocument(filename, FALSE); | 3385 | saveDocument(filename, FALSE); |
3306 | 3386 | ||
3387 | selectedItem = NULL; | ||
3307 | filename = newFile; | 3388 | filename = newFile; |
3308 | 3389 | ||
3309 | // save the current filename to the config file | 3390 | // save the current filename to the config file |
3310 | conf->writeEntry(APP_KEY+"document", filename); | 3391 | conf->writeEntry(APP_KEY+"document", filename); |
3311 | saveConf(); | 3392 | saveConf(); |
3312 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); | 3393 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); |
3313 | #ifdef WIN32 | 3394 | #ifdef WIN32 |
3314 | this->setCaption("Qt ZSafe: " + ti); | 3395 | this->setCaption("Qt ZSafe: " + ti); |
3315 | #else | 3396 | #else |
3316 | this->setCaption("ZSafe: " + ti); | 3397 | this->setCaption("ZSafe: " + ti); |
3317 | #endif | 3398 | #endif |
3318 | 3399 | ||
3319 | QMessageBox::information( this, tr("ZSafe"), | 3400 | QMessageBox::information( this, tr("ZSafe"), |
3320 | tr("Now you have to enter\na password twice for your\nnewly created document."), tr("&OK"), 0); | 3401 | tr("Now you have to enter\na password twice for your\nnewly created document."), tr("&OK"), 0); |
3321 | 3402 | ||
3322 | saveDocumentWithPwd(); | 3403 | saveDocumentWithPwd(); |
3323 | } | 3404 | } |
3324 | } | 3405 | } |
3325 | 3406 | ||
3326 | void ZSafe::saveDocumentWithoutPwd() | 3407 | void ZSafe::saveDocumentWithoutPwd() |
3327 | { | 3408 | { |
3328 | saveDocument(filename, FALSE); | 3409 | saveDocument(filename, FALSE); |
3329 | } | 3410 | } |
3330 | 3411 | ||
3331 | void ZSafe::saveDocumentWithPwd() | 3412 | void ZSafe::saveDocumentWithPwd() |
3332 | { | 3413 | { |
3333 | saveDocument(filename, TRUE); | 3414 | saveDocument(filename, TRUE); |
3334 | } | 3415 | } |
3335 | 3416 | ||
3336 | void ZSafe::about() | 3417 | void ZSafe::about() |
3337 | { | 3418 | { |
3338 | QString info; | 3419 | QString info; |
3339 | info = "<html><body><div align=""center"">"; | 3420 | info = "<html><body><div align=""center"">"; |
3340 | info += "<b>"; | 3421 | info += "<b>"; |
3341 | info += tr("Zaurus Password Manager<br>"); | 3422 | info += tr("Zaurus Password Manager<br>"); |
3342 | info += tr("ZSafe version 2.1.2<br>"); | 3423 | info += tr("ZSafe version 2.1.2<br>"); |
3343 | info += "</b>"; | 3424 | info += "</b>"; |
3344 | info += tr("by Carsten Schneider<br>"); | 3425 | info += tr("by Carsten Schneider<br>"); |
3345 | info += "zcarsten@gmx.net<br>"; | 3426 | info += "zcarsten@gmx.net<br>"; |
3346 | info += "http://z-soft.z-portal.info/zsafe"; | 3427 | info += "http://z-soft.z-portal.info/zsafe"; |
3347 | info += "<br>"; | 3428 | info += "<br>"; |
3348 | info += tr("Translations by Robert Ernst<br>"); | 3429 | info += tr("Translations by Robert Ernst<br>"); |
3349 | info += "robert.ernst@linux-solutions.at<br>"; | 3430 | info += "robert.ernst@linux-solutions.at<br>"; |
3350 | info += "<br></div>"; | 3431 | info += "<br></div>"; |
3351 | info += "</body></html>"; | 3432 | info += "</body></html>"; |
3352 | 3433 | ||
3353 | // QMessageBox::information( this, tr("ZSafe"), info, tr("&OK"), 0); | 3434 | // QMessageBox::information( this, tr("ZSafe"), info, tr("&OK"), 0); |
3354 | 3435 | ||
diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro index ae4c793..5cb74dd 100644 --- a/noncore/apps/zsafe/zsafe.pro +++ b/noncore/apps/zsafe/zsafe.pro | |||
@@ -1,22 +1,22 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \ | 4 | HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \ |
5 | scqtfiledlg.h | 5 | scqtfiledlg.h |
6 | SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \ | 6 | SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \ |
7 | categorylist.cpp zlistview.cpp shadedlistitem.cpp\ | 7 | categorylist.cpp zlistview.cpp shadedlistitem.cpp\ |
8 | scqtfileedit.cpp scqtfileedit.moc.cpp \ | 8 | scqtfileedit.cpp scqtfileedit.moc.cpp \ |
9 | scqtfiledlg.cpp | 9 | scqtfiledlg.cpp |
10 | INTERFACES = newdialog.ui searchdialog.ui passworddialog.ui categorydialog.ui | 10 | INTERFACES = newdialog.ui searchdialog.ui passworddialog.ui categorydialog.ui |
11 | INTERFACES += infoform.ui wait.ui | 11 | INTERFACES += infoform.ui wait.ui |
12 | 12 | ||
13 | INCLUDEPATH+= $(OPIEDIR)/include | 13 | INCLUDEPATH+= $(OPIEDIR)/include |
14 | INCLUDEPATH+= . | 14 | INCLUDEPATH+= . |
15 | INCLUDEPATH+= $(OPIEDIR)/noncore/apps/zsafe | 15 | INCLUDEPATH+= $(OPIEDIR)/noncore/apps/zsafe |
16 | DEPENDPATH+= $(OPIEDIR)/include | 16 | DEPENDPATH+= $(OPIEDIR)/include |
17 | LIBS += -Wl,-rpath,$(OPIEDIR)/lib -L$(OPIEDIR)/lib -lqpe | 17 | LIBS += -Wl,-rpath,$(OPIEDIR)/lib -L$(OPIEDIR)/lib -lqpe -lopie |
18 | TARGET = zsafe | 18 | TARGET = zsafe |
19 | TRANSLATIONS = $(OPIEDIR)/noncore/apps/zsafe/i18n/de/zsafe.ts | 19 | TRANSLATIONS = $(OPIEDIR)/noncore/apps/zsafe/i18n/de/zsafe.ts |
20 | 20 | ||
21 | #include ( $(OPIEDIR)/include.pro ) | 21 | #include ( $(OPIEDIR)/include.pro ) |
22 | 22 | ||