summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-03 15:08:34 (UTC)
committer zautrix <zautrix>2005-03-03 15:08:34 (UTC)
commit9a36b5727a918b73b96fa285c3cff393ec5f43ed (patch) (unidiff)
treee8740230f22c8a469070c086902c8dc62de1f4c7
parenta4ea625087ea7213419828e8decdff48ae231968 (diff)
downloadkdepimpi-9a36b5727a918b73b96fa285c3cff393ec5f43ed.zip
kdepimpi-9a36b5727a918b73b96fa285c3cff393ec5f43ed.tar.gz
kdepimpi-9a36b5727a918b73b96fa285c3cff393ec5f43ed.tar.bz2
nochn fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt4
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index ccc9d83..2650e28 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -1,356 +1,360 @@
1{ " Local Time","Ortszeit" }, 1{ " Local Time","Ortszeit" },
2{ "Default","Standard" }, 2{ "Default","Standard" },
3{ "Configure...","Konfigurieren..." }, 3{ "Configure...","Konfigurieren..." },
4{ "Remove sync info","Entferne Sync Info" }, 4{ "Remove sync info","Entferne Sync Info" },
5{ "For all profiles","Für alle Profile" }, 5{ "For all profiles","Für alle Profile" },
6{ "Enable Pi-Sync","Aktiviere Pi-Sync" }, 6{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
7{ "Multiple sync","Multi Sync" }, 7{ "Multiple sync","Multi Sync" },
8{ "&Save","&Speichern" }, 8{ "&Save","&Speichern" },
9{ "&Print...","Drucken..." }, 9{ "&Print...","Drucken..." },
10{ "&File","Datei" }, 10{ "&File","Datei" },
11{ "&Edit","Bearbeite" }, 11{ "&Edit","Bearbeite" },
12{ "&View","Ansicht" }, 12{ "&View","Ansicht" },
13{ "&Help","Hilfe" }, 13{ "&Help","Hilfe" },
14{ "Description","Beschreibungen" }, 14{ "Description","Beschreibungen" },
15{ "URL","URL" }, 15{ "URL","URL" },
16{ "Name:","Name:" }, 16{ "Name:","Name:" },
17{ "Documents","Dokumente" }, 17{ "Documents","Dokumente" },
18{ "Files","Dateien" }, 18{ "Files","Dateien" },
19{ "All Files","Alle Dateien" }, 19{ "All Files","Alle Dateien" },
20{ "Name","Name" }, 20{ "Name","Name" },
21{ "Size","Größe" }, 21{ "Size","Größe" },
22{ "Date","Datum" }, 22{ "Date","Datum" },
23{ "Mime Type","Mime Typ" }, 23{ "Mime Type","Mime Typ" },
24{ "Ok","Ok" }, 24{ "Ok","Ok" },
25{ "Cancel","Abbrechen" }, 25{ "Cancel","Abbrechen" },
26{ "1","1" }, 26{ "1","1" },
27{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" }, 27{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
28{ "Local device name:","Name dieses Gerätes:" }, 28{ "Local device name:","Name dieses Gerätes:" },
29{ "New profile","Neues Profil" }, 29{ "New profile","Neues Profil" },
30{ "Clone profile","Klone Profil" }, 30{ "Clone profile","Klone Profil" },
31{ "Delete profile","Lösche Profil" }, 31{ "Delete profile","Lösche Profil" },
32{ "Profile:","Profil:" }, 32{ "Profile:","Profil:" },
33{ "Multiple Sync options","Multi Sync Optionen" }, 33{ "Multiple Sync options","Multi Sync Optionen" },
34{ "Include in multiple ","Beziehe in mehrfach " }, 34{ "Include in multiple ","Beziehe in mehrfach " },
35{ "calendar ","Kalender " }, 35{ "calendar ","Kalender " },
36{ "addressbook ","Adressbuch " }, 36{ "addressbook ","Adressbuch " },
37{ "pwmanager","PWmanager" }, 37{ "pwmanager","PWmanager" },
38{ " sync"," Sync ein" }, 38{ " sync"," Sync ein" },
39{ "Sync algo options","Sync Ablauf Optionen" }, 39{ "Sync algo options","Sync Ablauf Optionen" },
40{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 40{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
41{ "Sync preferences","Synchronisations Einstellungen" }, 41{ "Sync preferences","Synchronisations Einstellungen" },
42{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 42{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
43{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 43{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
44{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 44{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
45{ "Ask for every entry on conflict","Frage bei Konflikten nach" }, 45{ "Ask for every entry on conflict","Frage bei Konflikten nach" },
46{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 46{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
47{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 47{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
48{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 48{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
49{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 49{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
50{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 50{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
51{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 51{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
52{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 52{ "Write back synced data","Schreibe gesyncte Daten zurück" },
53{ "Write back options","Optionen zum Zurückschreiben" }, 53{ "Write back options","Optionen zum Zurückschreiben" },
54{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 54{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
55{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 55{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
56{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 56{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
57{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 57{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
58{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 58{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
59{ "Time period","Zeitspanne" }, 59{ "Time period","Zeitspanne" },
60{ "From ","Von " }, 60{ "From ","Von " },
61{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 61{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
62{ " weeks in the future "," Wochen in der Zukunft " }, 62{ " weeks in the future "," Wochen in der Zukunft " },
63{ "Profile kind","Profil Art" }, 63{ "Profile kind","Profil Art" },
64{ "Local file","Lokale Datei" }, 64{ "Local file","Lokale Datei" },
65{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 65{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
66{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 66{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
67{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 67{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
68{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 68{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
69{ "I/O device: ","I/O device: " }, 69{ "I/O device: ","I/O device: " },
70{ "Help...","Hilfe..." }, 70{ "Help...","Hilfe..." },
71{ "Connection: ","Connection: " }, 71{ "Connection: ","Connection: " },
72{ "Model(opt.): ","Model(opt.): " }, 72{ "Model(opt.): ","Model(opt.): " },
73{ "Local file Cal:","Lokale Datei Kal:" }, 73{ "Local file Cal:","Lokale Datei Kal:" },
74{ "Local file ABook:","Lokale Datei ABuch:" }, 74{ "Local file ABook:","Lokale Datei ABuch:" },
75{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 75{ "Local file PWMgr:","Lokale Datei PWMgr:" },
76{ "Choose...","Wähle..." }, 76{ "Choose...","Wähle..." },
77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
78{ "Calendar:","Kalender:" }, 78{ "Calendar:","Kalender:" },
79{ "AddressBook:","AdressBuch:" }, 79{ "AddressBook:","AdressBuch:" },
80{ "PWManager:","PWManager:" }, 80{ "PWManager:","PWManager:" },
81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
82{ "Local temp file:","Lokale temp Datei:" }, 82{ "Local temp file:","Lokale temp Datei:" },
83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
85{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 85{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
86{ "ssh/scp","ssh/scp" }, 86{ "ssh/scp","ssh/scp" },
87{ "ftp","ftp" }, 87{ "ftp","ftp" },
88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
94{ "No Filter","Kein Filter" }, 94{ "No Filter","Kein Filter" },
95{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 95{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
98{ "Configure","Konfiguriere" }, 98{ "Configure","Konfiguriere" },
99{ "Apply","Anwenden" }, 99{ "Apply","Anwenden" },
100{ "None","Kein" }, 100{ "None","Kein" },
101{ "Global","Allgemein" }, 101{ "Global","Allgemein" },
102{ "Email","E-Mail" }, 102{ "Email","E-Mail" },
103{ "Phone","Telefon" }, 103{ "Phone","Telefon" },
104{ "SMS","SMS" }, 104{ "SMS","SMS" },
105{ "Fax","Fax" }, 105{ "Fax","Fax" },
106{ "Pager","Pager" }, 106{ "Pager","Pager" },
107{ "SIP","SIP" }, 107{ "SIP","SIP" },
108{ "Language:(needs restart)","Sprache:(Neustart)" }, 108{ "Language:(needs restart)","Sprache:(Neustart)" },
109{ "English","English" }, 109{ "English","English" },
110{ "German","Deutsch" }, 110{ "German","Deutsch" },
111{ "French","Französisch" }, 111{ "French","Französisch" },
112{ "Italian","Italienisch" }, 112{ "Italian","Italienisch" },
113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
114{ "Language","Sprache" }, 114{ "Language","Sprache" },
115{ "Time Format(nr):","Zeit Format(nr):" }, 115{ "Time Format(nr):","Zeit Format(nr):" },
116{ "24:00","24:00" }, 116{ "24:00","24:00" },
117{ "12:00am","12:00am" }, 117{ "12:00am","12:00am" },
118{ "Week starts on Sunday","Woche beginnt Sonntags" }, 118{ "Week starts on Sunday","Woche beginnt Sonntags" },
119{ "Time Format","Zeit Format" }, 119{ "Time Format","Zeit Format" },
120{ "Date Format:","Datums Format:" }, 120{ "Date Format:","Datums Format:" },
121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
124{ "User defined","Benutzerdefiniert" }, 124{ "User defined","Benutzerdefiniert" },
125{ "User long date:","Format langes Datum:" }, 125{ "User long date:","Format langes Datum:" },
126{ "User short date:","Format kurzes Datum:" }, 126{ "User short date:","Format kurzes Datum:" },
127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
130{ "Date Format","Datums Format" }, 130{ "Date Format","Datums Format" },
131{ "Timezone:","Zeitzone:" }, 131{ "Timezone:","Zeitzone:" },
132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
136{ "Daylight start:","Sommerzeit Beginn:" }, 136{ "Daylight start:","Sommerzeit Beginn:" },
137{ "Mon","Mo" }, 137{ "Mon","Mo" },
138{ "Tue","Di" }, 138{ "Tue","Di" },
139{ "Wed","Mi" }, 139{ "Wed","Mi" },
140{ "Thu","Do" }, 140{ "Thu","Do" },
141{ "Fri","Fr" }, 141{ "Fri","Fr" },
142{ "Sat","Sa" }, 142{ "Sat","Sa" },
143{ "Sun","So" }, 143{ "Sun","So" },
144{ "January","Januar" }, 144{ "January","Januar" },
145{ "February","Februar" }, 145{ "February","Februar" },
146{ "March","März" }, 146{ "March","März" },
147{ "April","April" }, 147{ "April","April" },
148{ "May","Mai" }, 148{ "May","Mai" },
149{ "June","Juni" }, 149{ "June","Juni" },
150{ "July","July" }, 150{ "July","July" },
151{ "August","August" }, 151{ "August","August" },
152{ "September","September" }, 152{ "September","September" },
153{ "October","October" }, 153{ "October","October" },
154{ "November","November" }, 154{ "November","November" },
155{ "December","Dezember" }, 155{ "December","Dezember" },
156{ "tomorrow","Morgen" }, 156{ "tomorrow","Morgen" },
157{ "today","Heute" }, 157{ "today","Heute" },
158{ "yesterday","Gestern" }, 158{ "yesterday","Gestern" },
159{ "Monday","Montag" }, 159{ "Monday","Montag" },
160{ "Tuesday","Dienstag" }, 160{ "Tuesday","Dienstag" },
161{ "Wednesday","Mittwoch" }, 161{ "Wednesday","Mittwoch" },
162{ "Thursday","Donnerstag" }, 162{ "Thursday","Donnerstag" },
163{ "Friday","Freitag" }, 163{ "Friday","Freitag" },
164{ "Saturday","Samstag" }, 164{ "Saturday","Samstag" },
165{ "Sunday","Sonntag" }, 165{ "Sunday","Sonntag" },
166{ "Daylight end:","Sommerzeit Ende:" }, 166{ "Daylight end:","Sommerzeit Ende:" },
167{ "Time Zone","Zeit Zone" }, 167{ "Time Zone","Zeit Zone" },
168{ "Used Mail Client","Benutzter Mail Client" }, 168{ "Used Mail Client","Benutzter Mail Client" },
169{ "Channel:","Channel:" }, 169{ "Channel:","Channel:" },
170{ "Message:","Message:" }, 170{ "Message:","Message:" },
171{ "Parameters:","Parameter:" }, 171{ "Parameters:","Parameter:" },
172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
173{ "extra Message:","extra Message:" }, 173{ "extra Message:","extra Message:" },
174{ "extra Parameters:","extra Parameter:" }, 174{ "extra Parameters:","extra Parameter:" },
175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
176{ "External Apps.","Externe Appl." }, 176{ "External Apps.","Externe Appl." },
177{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 177{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
180{ "Save settings","Speichere Einstellungen" }, 180{ "Save settings","Speichere Einstellungen" },
181{ "Save standard","Speichere Standard" }, 181{ "Save standard","Speichere Standard" },
182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
184{ "Data storage path","Daten Speicherpfad" }, 184{ "Data storage path","Daten Speicherpfad" },
185{ "Used %1 Client","Benutzer %1 Client" }, 185{ "Used %1 Client","Benutzer %1 Client" },
186{ "No email client installed","Keine Email Client installiert" }, 186{ "No email client installed","Keine Email Client installiert" },
187{ "Userdefined email client","Benutzerdef. Email Client" }, 187{ "Userdefined email client","Benutzerdef. Email Client" },
188{ "OM/Pi email client","OM/Pi Email Client" }, 188{ "OM/Pi email client","OM/Pi Email Client" },
189{ "URL:","URL:" }, 189{ "URL:","URL:" },
190{ "No","Nein" }, 190{ "No","Nein" },
191{ "Yes","Ja" }, 191{ "Yes","Ja" },
192{ "Untitled","Unbenannt" }, 192{ "Untitled","Unbenannt" },
193{ "&New","&Neu" }, 193{ "&New","&Neu" },
194{ "&Open","&Öffne" }, 194{ "&Open","&Öffne" },
195{ "&Close","Schließen" }, 195{ "&Close","Schließen" },
196{ "Save &as...","Speichere &als..." }, 196{ "Save &as...","Speichere &als..." },
197{ "&Text-file...","&Text-Datei..." }, 197{ "&Text-file...","&Text-Datei..." },
198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." }, 198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." },
199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." }, 199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." },
200{ "E&xport","E&xport" }, 200{ "E&xport","E&xport" },
201{ "I&mport","I&mport" }, 201{ "I&mport","I&mport" },
202{ "&Quit","Beenden" }, 202{ "&Quit","Beenden" },
203{ "&Add password","&Passwort hinzufügen" }, 203{ "&Add password","&Passwort hinzufügen" },
204{ "&Delete","Lösche" }, 204{ "&Delete","Lösche" },
205{ "Change &Master Password","Ändere &Master Passwort" }, 205{ "Change &Master Password","Ändere &Master Passwort" },
206{ "&Manage","Verwalte" }, 206{ "&Manage","Verwalte" },
207{ "&Find","&Finde" }, 207{ "&Find","&Finde" },
208{ "&Lock all entries","Sperre alle Einträge" }, 208{ "&Lock all entries","Sperre alle Einträge" },
209{ "&Deep-lock all entries","Sperre total alle Einträge" }, 209{ "&Deep-lock all entries","Sperre total alle Einträge" },
210{ "&Unlock all entries","Entsperre alle Einträge" }, 210{ "&Unlock all entries","Entsperre alle Einträge" },
211{ "&Configure...","Konfiguriere..." }, 211{ "&Configure...","Konfiguriere..." },
212{ "&Options","Konfig" }, 212{ "&Options","Konfig" },
213{ "C&ategories...","K&ategorien..." }, 213{ "C&ategories...","K&ategorien..." },
214{ "&Sync","&Sync" }, 214{ "&Sync","&Sync" },
215{ "&License","&Lizenz" }, 215{ "&License","&Lizenz" },
216{ "&Faq","&Faq" }, 216{ "&Faq","&Faq" },
217{ "&About PwManager","Über PwManager" }, 217{ "&About PwManager","Über PwManager" },
218{ "&Sync HowTo","&Sync HowTo" }, 218{ "&Sync HowTo","&Sync HowTo" },
219{ "&What's New","Was ist neu?" }, 219{ "&What's New","Was ist neu?" },
220{ "New","Neu" }, 220{ "New","Neu" },
221{ "Open","Öffnen" }, 221{ "Open","Öffnen" },
222{ "Save","Speichern" }, 222{ "Save","Speichern" },
223{ "Save as","Speichern als" }, 223{ "Save as","Speichern als" },
224{ "Print...","Drucke..." }, 224{ "Print...","Drucke..." },
225{ "Add password","Passwort hinzufügen" }, 225{ "Add password","Passwort hinzufügen" },
226{ "Edit password","Passwort ändern" }, 226{ "Edit password","Passwort ändern" },
227{ "Delete password","Passwort löschen" }, 227{ "Delete password","Passwort löschen" },
228{ "Find entry","Finde Eintrag" }, 228{ "Find entry","Finde Eintrag" },
229{ "Lock all entries","Sperre alle Einträge" }, 229{ "Lock all entries","Sperre alle Einträge" },
230{ "Deep-Lock all entries","Sperre total alle Einträge" }, 230{ "Deep-Lock all entries","Sperre total alle Einträge" },
231{ "Unlock all entries","Entsperre alle Einträge" }, 231{ "Unlock all entries","Entsperre alle Einträge" },
232{ "Categories:","Kategorien:" }, 232{ "Categories:","Kategorien:" },
233{ "&Rename","&Umbenennen" }, 233{ "&Rename","&Umbenennen" },
234{ "Username","Benutzername" }, 234{ "Username","Benutzername" },
235{ "Password","Passwort" }, 235{ "Password","Passwort" },
236{ "Launcher","Launcher" }, 236{ "Launcher","Launcher" },
237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" }, 237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" }, 238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" }, 239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
240{ "copy url to clipboard","Kopiere URL ins Clipboard" }, 240{ "copy url to clipboard","Kopiere URL ins Clipboard" },
241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" }, 241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" }, 242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
243{ "Execute "Launcher"",""Launcher" ausführen" }, 243{ "Execute "Launcher"",""Launcher" ausführen" },
244{ "Go to "URL"","Gehe zu "URL"" }, 244{ "Go to "URL"","Gehe zu "URL"" },
245{ "Ready.","Fertig." }, 245{ "Ready.","Fertig." },
246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" }, 246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
247{ "File error","Datei Fehler" }, 247{ "File error","Datei Fehler" },
248{ "Could not read file!","Kann Datei nicht lesen!" }, 248{ "Could not read file!","Kann Datei nicht lesen!" },
249{ "Master-password","Master-Passwort" }, 249{ "Master-password","Master-Passwort" },
250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" }, 250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." }, 251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
252{ "password error","Passwort Fehler" }, 252{ "password error","Passwort Fehler" },
253{ "Successfully opened file.","Datei erfolgreich geöffnet." }, 253{ "Successfully opened file.","Datei erfolgreich geöffnet." },
254{ "DEEP-LOCKED","TOTAL-GESPERRT" }, 254{ "DEEP-LOCKED","TOTAL-GESPERRT" },
255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." }, 255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." },
256{ "<LOCKED>","<GESPERRT>" }, 256{ "<LOCKED>","<GESPERRT>" },
257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." }, 257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." },
258{ "PwManager","PwManager" }, 258{ "PwManager","PwManager" },
259{ "Window-style:","Window-Stil:" }, 259{ "Window-style:","Window-Stil:" },
260{ "Category on top","Kategorien oben" }, 260{ "Category on top","Kategorien oben" },
261{ "Category-list left/top","Kategorien links oben" }, 261{ "Category-list left/top","Kategorien links oben" },
262{ "Font for Password entries:","Schrift für Passwort Einträge:" }, 262{ "Font for Password entries:","Schrift für Passwort Einträge:" },
263{ "Font for Password summary:","Schrift für Passwort Übersicht:" }, 263{ "Font for Password summary:","Schrift für Passwort Übersicht:" },
264{ "Font:","Schriftart:" }, 264{ "Font:","Schriftart:" },
265{ "Summary","Übersicht" }, 265{ "Summary","Übersicht" },
266{ "Compression:","Kompression:" }, 266{ "Compression:","Kompression:" },
267{ "gzip","gzip" }, 267{ "gzip","gzip" },
268{ "Encryption:","Verschlüsselung:" }, 268{ "Encryption:","Verschlüsselung:" },
269{ "Blowfish (128 bit)","Blowfish (128 bit)" }, 269{ "Blowfish (128 bit)","Blowfish (128 bit)" },
270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" }, 270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" }, 271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" }, 272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" }, 273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
274{ "Twofish (256 bit)","Twofish (256 bit)" }, 274{ "Twofish (256 bit)","Twofish (256 bit)" },
275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" }, 275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
276{ "Hashing:","Hashing:" }, 276{ "Hashing:","Hashing:" },
277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" }, 277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" }, 278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" }, 279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" }, 280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
281{ "MD5 (128 bit)","MD5 (128 bit)" }, 281{ "MD5 (128 bit)","MD5 (128 bit)" },
282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" }, 282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
283{ "Tiger (192 bit)","Tiger (192 bit)" }, 283{ "Tiger (192 bit)","Tiger (192 bit)" },
284{ "Permissions:","Zugriffsrechte:" }, 284{ "Permissions:","Zugriffsrechte:" },
285{ "Make backup before saving","Mache Backup vor dem Speichern" }, 285{ "Make backup before saving","Mache Backup vor dem Speichern" },
286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" }, 286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" },
287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" }, 287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" },
288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" }, 288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
289{ "open deeplocked","Öffne total gesperrt" }, 289{ "open deeplocked","Öffne total gesperrt" },
290{ "Favourite browser:","Bevorzugter Browser:" }, 290{ "Favourite browser:","Bevorzugter Browser:" },
291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" }, 291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" }, 292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
293{ "Look && feel","Aussehen" }, 293{ "Look && feel","Aussehen" },
294{ "File","Datei" }, 294{ "File","Datei" },
295{ "Timeout","Timeout" }, 295{ "Timeout","Timeout" },
296{ "Autostart","Autostart" }, 296{ "Autostart","Autostart" },
297{ "External apps","Externe Applik." }, 297{ "External apps","Externe Applik." },
298{ "Miscellaneous","Verschiedenes" }, 298{ "Miscellaneous","Verschiedenes" },
299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
300{ "edit category descriptions","Ändere Label für Kategorie" }, 300{ "edit category descriptions","Ändere Label für Kategorie" },
301{ "Close","Schließen" }, 301{ "Close","Schließen" },
302{ "Category:","Category:" }, 302{ "Category:","Category:" },
303{ "Text1 (Description):","Text1 (Beschreibung):" }, 303{ "Text1 (Description):","Text1 (Beschreibung):" },
304{ "Text2 (Username):","Text2 (Benutzername):" }, 304{ "Text2 (Username):","Text2 (Benutzername):" },
305{ "Text3 (Password):","Text3 (Passwort):" }, 305{ "Text3 (Password):","Text3 (Passwort):" },
306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" }, 306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
307{ "Description:","Beschreibung:" }, 307{ "Description:","Beschreibung:" },
308{ "Username:","Benutzername:" }, 308{ "Username:","Benutzername:" },
309{ "Password:","Passwort:" }, 309{ "Password:","Passwort:" },
310{ "&Reveal","&Offen zeigen" }, 310{ "&Reveal","&Offen zeigen" },
311{ "&Generate","&Generiere" }, 311{ "&Generate","&Generiere" },
312{ "&Password","&Passwort" }, 312{ "&Password","&Passwort" },
313{ "&Comments","Kommentar" }, 313{ "&Comments","Kommentar" },
314{ "Launcher:","Launcher:" }, 314{ "Launcher:","Launcher:" },
315{ "$d = Description","$d = Beschreibung" }, 315{ "$d = Description","$d = Beschreibung" },
316{ "$n = Username","$n = Benutzername" }, 316{ "$n = Username","$n = Benutzername" },
317{ "$c = Comment","$c = Kommentar" }, 317{ "$c = Comment","$c = Kommentar" },
318{ "$u = URL","$u = URL" }, 318{ "$u = URL","$u = URL" },
319{ "$p = Password","$p = Passwort" }, 319{ "$p = Password","$p = Passwort" },
320{ "&Launcher","&Launcher" }, 320{ "&Launcher","&Launcher" },
321{ "Password generator","Passwort Generator" }, 321{ "Password generator","Passwort Generator" },
322{ "Character set:","Buchstaben Set:" }, 322{ "Character set:","Buchstaben Set:" },
323{ "Lowercase (abc)","Klein (abc)" }, 323{ "Lowercase (abc)","Klein (abc)" },
324{ "Uppercase (ABC)","Groß (ABC)" }, 324{ "Uppercase (ABC)","Groß (ABC)" },
325{ "Numbers (123)","Nummmern (123)" }, 325{ "Numbers (123)","Nummmern (123)" },
326{ "Special characters:","Spezielle Buchstaben:" }, 326{ "Special characters:","Spezielle Buchstaben:" },
327{ "Spaces (blank characters)","Leerzeichen" }, 327{ "Spaces (blank characters)","Leerzeichen" },
328{ "User defined:","Benutzer definiert:" }, 328{ "User defined:","Benutzer definiert:" },
329{ "Password Length:","Passwort Länge:" }, 329{ "Password Length:","Passwort Länge:" },
330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" }, 330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
331{ "no password","Kein Passwort" }, 331{ "no password","Kein Passwort" },
332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." }, 332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
333{ "not saved, yet","not saved, yet" }, 333{ "not saved, yet","not saved, yet" },
334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." }, 334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
335{ "Find","Finde" }, 335{ "Find","Finde" },
336{ "&Exact match","Genaue Übereinstimmung" }, 336{ "&Exact match","Genaue Übereinstimmung" },
337{ "&Case sensitive","Großschrift abhängig" }, 337{ "&Case sensitive","Großschrift abhängig" },
338{ "Search in Column","Suche in Spalten" }, 338{ "Search in Column","Suche in Spalten" },
339{ "&Description","Beschreibung" }, 339{ "&Description","Beschreibung" },
340{ "C&omment","Kommentar" }, 340{ "C&omment","Kommentar" },
341{ "&Username","Benutzername" }, 341{ "&Username","Benutzername" },
342{ "U&RL","URL" }, 342{ "U&RL","URL" },
343{ "delete?","Löschen?" }, 343{ "delete?","Löschen?" },
344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" }, 344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
345{ "Save?","Speichern?" }, 345{ "Save?","Speichern?" },
346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" }, 346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
347{ "The list\n "","Die Liste\n "" }, 347{ "The list\n "","Die Liste\n "" },
348{ "nothing to do","Nichts zu tun" }, 348{ "nothing to do","Nichts zu tun" },
349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." }, 349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
350{ "Add new password","Passwort hinzufügen" }, 350{ "Add new password","Passwort hinzufügen" },
351{ "Successfully saved data.","Datei gespeichert." }, 351{ "Successfully saved data.","Datei gespeichert." },
352{ "Category:","Kategorie:" }, 352{ "Category:","Kategorie:" },
353{ "LOCKED","GESPERRT" },
354{ "","" },
355{ "","" },
356{ "","" },
353{ "","" }, 357{ "","" },
354{ "","" }, 358{ "","" },
355{ "","" }, 359{ "","" },
356 360
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 6fbe110..61f2616 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -909,769 +909,769 @@ PwMerror PwMDoc::writeDataHash(char dataHash, string *d, QFile *f)
909 if (!LibGCryptIf::available()) 909 if (!LibGCryptIf::available())
910 return e_hashNotImpl; 910 return e_hashNotImpl;
911 LibGCryptIf gc; 911 LibGCryptIf gc;
912 PwMerror err; 912 PwMerror err;
913 unsigned char *buf; 913 unsigned char *buf;
914 size_t hashLen; 914 size_t hashLen;
915 err = gc.hash(&buf, 915 err = gc.hash(&buf,
916 &hashLen, 916 &hashLen,
917 reinterpret_cast<const unsigned char *>(d->c_str()), 917 reinterpret_cast<const unsigned char *>(d->c_str()),
918 d->size(), 918 d->size(),
919 dataHash); 919 dataHash);
920 if (err != e_success) 920 if (err != e_success)
921 return e_hashNotImpl; 921 return e_hashNotImpl;
922 if (f->writeBlock(reinterpret_cast<const char *>(buf), hashLen) 922 if (f->writeBlock(reinterpret_cast<const char *>(buf), hashLen)
923 != static_cast<Q_LONG>(hashLen)) { 923 != static_cast<Q_LONG>(hashLen)) {
924 delete [] buf; 924 delete [] buf;
925 return e_hashNotImpl; 925 return e_hashNotImpl;
926 } 926 }
927 delete [] buf; 927 delete [] buf;
928 break; 928 break;
929 } 929 }
930 default: { 930 default: {
931 return e_hashNotImpl; 931 return e_hashNotImpl;
932 } } 932 } }
933 933
934 return e_success; 934 return e_success;
935} 935}
936 936
937bool PwMDoc::backupFile(const QString &filePath) 937bool PwMDoc::backupFile(const QString &filePath)
938{ 938{
939 QFileInfo fi(filePath); 939 QFileInfo fi(filePath);
940 if (!fi.exists()) 940 if (!fi.exists())
941 return true; // Yes, true is correct. 941 return true; // Yes, true is correct.
942 QString pathOnly(fi.dirPath(true)); 942 QString pathOnly(fi.dirPath(true));
943 QString nameOnly(fi.fileName()); 943 QString nameOnly(fi.fileName());
944 QString backupPath = pathOnly 944 QString backupPath = pathOnly
945 + "/~" 945 + "/~"
946 + nameOnly 946 + nameOnly
947 + ".backup"; 947 + ".backup";
948 return copyFile(filePath, backupPath); 948 return copyFile(filePath, backupPath);
949} 949}
950 950
951bool PwMDoc::copyFile(const QString &src, const QString &dst) 951bool PwMDoc::copyFile(const QString &src, const QString &dst)
952{ 952{
953 QFileInfo fi(src); 953 QFileInfo fi(src);
954 if (!fi.exists()) 954 if (!fi.exists())
955 return false; 955 return false;
956 if (QFile::exists(dst)) { 956 if (QFile::exists(dst)) {
957 if (!QFile::remove(dst)) 957 if (!QFile::remove(dst))
958 return false; 958 return false;
959 } 959 }
960 QFile srcFd(src); 960 QFile srcFd(src);
961 if (!srcFd.open(IO_ReadOnly)) 961 if (!srcFd.open(IO_ReadOnly))
962 return false; 962 return false;
963 QFile dstFd(dst); 963 QFile dstFd(dst);
964 if (!dstFd.open(IO_ReadWrite)) { 964 if (!dstFd.open(IO_ReadWrite)) {
965 srcFd.close(); 965 srcFd.close();
966 return false; 966 return false;
967 } 967 }
968 const int tmpBuf_size = 512; 968 const int tmpBuf_size = 512;
969 char tmpBuf[tmpBuf_size]; 969 char tmpBuf[tmpBuf_size];
970 Q_LONG bytesRead, bytesWritten; 970 Q_LONG bytesRead, bytesWritten;
971 971
972 while (!srcFd.atEnd()) { 972 while (!srcFd.atEnd()) {
973 bytesRead = srcFd.readBlock(tmpBuf, 973 bytesRead = srcFd.readBlock(tmpBuf,
974 static_cast<Q_ULONG>(tmpBuf_size)); 974 static_cast<Q_ULONG>(tmpBuf_size));
975 if (bytesRead == -1) { 975 if (bytesRead == -1) {
976 srcFd.close(); 976 srcFd.close();
977 dstFd.close(); 977 dstFd.close();
978 return false; 978 return false;
979 } 979 }
980 bytesWritten = dstFd.writeBlock(tmpBuf, 980 bytesWritten = dstFd.writeBlock(tmpBuf,
981 static_cast<Q_ULONG>(bytesRead)); 981 static_cast<Q_ULONG>(bytesRead));
982 if (bytesWritten != bytesRead) { 982 if (bytesWritten != bytesRead) {
983 srcFd.close(); 983 srcFd.close();
984 dstFd.close(); 984 dstFd.close();
985 return false; 985 return false;
986 } 986 }
987 } 987 }
988 srcFd.close(); 988 srcFd.close();
989 dstFd.close(); 989 dstFd.close();
990 return true; 990 return true;
991} 991}
992 992
993PwMerror PwMDoc::addEntry(const QString &category, PwMDataItem *d, 993PwMerror PwMDoc::addEntry(const QString &category, PwMDataItem *d,
994 bool dontFlagDirty, bool updateMeta) 994 bool dontFlagDirty, bool updateMeta)
995{ 995{
996 PWM_ASSERT(d); 996 PWM_ASSERT(d);
997 unsigned int cat = 0; 997 unsigned int cat = 0;
998 998
999 if (isDeepLocked()) { 999 if (isDeepLocked()) {
1000 PwMerror ret; 1000 PwMerror ret;
1001 ret = deepLock(false); 1001 ret = deepLock(false);
1002 if (ret != e_success) 1002 if (ret != e_success)
1003 return e_lock; 1003 return e_lock;
1004 } 1004 }
1005 1005
1006 addCategory(category, &cat); 1006 addCategory(category, &cat);
1007 1007
1008 if (numEntries(category) >= maxEntries) 1008 if (numEntries(category) >= maxEntries)
1009 return e_maxAllowedEntr; 1009 return e_maxAllowedEntr;
1010 1010
1011 vector<unsigned int> foundPositions; 1011 vector<unsigned int> foundPositions;
1012 /* historically this was: 1012 /* historically this was:
1013 *const int searchIn = SEARCH_IN_DESC | SEARCH_IN_NAME | 1013 *const int searchIn = SEARCH_IN_DESC | SEARCH_IN_NAME |
1014 * SEARCH_IN_URL | SEARCH_IN_LAUNCHER; 1014 * SEARCH_IN_URL | SEARCH_IN_LAUNCHER;
1015 * But for now we only search in desc. 1015 * But for now we only search in desc.
1016 * That's a tweak to be KWallet compatible. But it should not add 1016 * That's a tweak to be KWallet compatible. But it should not add
1017 * usability-drop onto PwManager, does it? 1017 * usability-drop onto PwManager, does it?
1018 * (And yes, "int" was a bug. Correct is "unsigned int") 1018 * (And yes, "int" was a bug. Correct is "unsigned int")
1019 */ 1019 */
1020 const unsigned int searchIn = SEARCH_IN_DESC; 1020 const unsigned int searchIn = SEARCH_IN_DESC;
1021 findEntry(cat, *d, searchIn, &foundPositions, true); 1021 findEntry(cat, *d, searchIn, &foundPositions, true);
1022 if (foundPositions.size()) { 1022 if (foundPositions.size()) {
1023 // DOH! We found this entry. 1023 // DOH! We found this entry.
1024 return e_entryExists; 1024 return e_entryExists;
1025 } 1025 }
1026 1026
1027 d->listViewPos = -1; 1027 d->listViewPos = -1;
1028 d->lockStat = conf()->confGlobNewEntrLockStat(); 1028 d->lockStat = conf()->confGlobNewEntrLockStat();
1029 if (updateMeta) { 1029 if (updateMeta) {
1030 d->meta.create = QDateTime::currentDateTime(); 1030 d->meta.create = QDateTime::currentDateTime();
1031 d->meta.update = d->meta.create; 1031 d->meta.update = d->meta.create;
1032 } 1032 }
1033 dti.dta[cat].d.push_back(*d); 1033 dti.dta[cat].d.push_back(*d);
1034 1034
1035 delAllEmptyCat(true); 1035 delAllEmptyCat(true);
1036 1036
1037 if (!dontFlagDirty) 1037 if (!dontFlagDirty)
1038 flagDirty(); 1038 flagDirty();
1039 return e_success; 1039 return e_success;
1040} 1040}
1041 1041
1042PwMerror PwMDoc::addCategory(const QString &category, unsigned int *categoryIndex, 1042PwMerror PwMDoc::addCategory(const QString &category, unsigned int *categoryIndex,
1043 bool checkIfExist) 1043 bool checkIfExist)
1044{ 1044{
1045 if (isDeepLocked()) { 1045 if (isDeepLocked()) {
1046 PwMerror ret; 1046 PwMerror ret;
1047 ret = deepLock(false); 1047 ret = deepLock(false);
1048 if (ret != e_success) 1048 if (ret != e_success)
1049 return e_lock; 1049 return e_lock;
1050 } 1050 }
1051 if (checkIfExist) { 1051 if (checkIfExist) {
1052 if (findCategory(category, categoryIndex)) 1052 if (findCategory(category, categoryIndex))
1053 return e_categoryExists; 1053 return e_categoryExists;
1054 } 1054 }
1055 PwMCategoryItem item; 1055 PwMCategoryItem item;
1056 //US ENH: clear item to initialize with default values, or create a constructor 1056 //US ENH: clear item to initialize with default values, or create a constructor
1057 item.clear(); 1057 item.clear();
1058 1058
1059 item.name = category.latin1(); 1059 item.name = category.latin1();
1060 dti.dta.push_back(item); 1060 dti.dta.push_back(item);
1061 if (categoryIndex) 1061 if (categoryIndex)
1062 *categoryIndex = dti.dta.size() - 1; 1062 *categoryIndex = dti.dta.size() - 1;
1063 return e_success; 1063 return e_success;
1064} 1064}
1065 1065
1066bool PwMDoc::delEntry(const QString &category, unsigned int index, bool dontFlagDirty) 1066bool PwMDoc::delEntry(const QString &category, unsigned int index, bool dontFlagDirty)
1067{ 1067{
1068 unsigned int cat = 0; 1068 unsigned int cat = 0;
1069 1069
1070 if (!findCategory(category, &cat)) { 1070 if (!findCategory(category, &cat)) {
1071 BUG(); 1071 BUG();
1072 return false; 1072 return false;
1073 } 1073 }
1074 1074
1075 return delEntry(cat, index, dontFlagDirty); 1075 return delEntry(cat, index, dontFlagDirty);
1076} 1076}
1077 1077
1078bool PwMDoc::delEntry(unsigned int category, unsigned int index, bool dontFlagDirty) 1078bool PwMDoc::delEntry(unsigned int category, unsigned int index, bool dontFlagDirty)
1079{ 1079{
1080 if (isDeepLocked()) 1080 if (isDeepLocked())
1081 return false; 1081 return false;
1082 if (index > dti.dta[category].d.size() - 1) 1082 if (index > dti.dta[category].d.size() - 1)
1083 return false; 1083 return false;
1084 getDataChangedLock(); 1084 getDataChangedLock();
1085 if (!lockAt(category, index, false)) { 1085 if (!lockAt(category, index, false)) {
1086 putDataChangedLock(); 1086 putDataChangedLock();
1087 return false; 1087 return false;
1088 } 1088 }
1089 putDataChangedLock(); 1089 putDataChangedLock();
1090 int lvPos = dti.dta[category].d[index].listViewPos; 1090 int lvPos = dti.dta[category].d[index].listViewPos;
1091 1091
1092 // delete entry 1092 // delete entry
1093 dti.dta[category].d.erase(dti.dta[category].d.begin() + index); 1093 dti.dta[category].d.erase(dti.dta[category].d.begin() + index);
1094 1094
1095 unsigned int i, entries = numEntries(category); 1095 unsigned int i, entries = numEntries(category);
1096 if (!entries) { 1096 if (!entries) {
1097 // no more entries in this category, so 1097 // no more entries in this category, so
1098 // we can delete it, too. 1098 // we can delete it, too.
1099 BUG_ON(!delCategory(category)); 1099 BUG_ON(!delCategory(category));
1100 // delCategory() flags it dirty, so we need not to do so. 1100 // delCategory() flags it dirty, so we need not to do so.
1101 return true; 1101 return true;
1102 } 1102 }
1103 for (i = 0; i < entries; ++i) { 1103 for (i = 0; i < entries; ++i) {
1104 // decrement all listViewPositions that are greater than the deleted. 1104 // decrement all listViewPositions that are greater than the deleted.
1105 if (dti.dta[category].d[i].listViewPos > lvPos) 1105 if (dti.dta[category].d[i].listViewPos > lvPos)
1106 --dti.dta[category].d[i].listViewPos; 1106 --dti.dta[category].d[i].listViewPos;
1107 } 1107 }
1108 1108
1109 if (!dontFlagDirty) 1109 if (!dontFlagDirty)
1110 flagDirty(); 1110 flagDirty();
1111 return true; 1111 return true;
1112} 1112}
1113 1113
1114bool PwMDoc::editEntry(const QString &oldCategory, const QString &newCategory, 1114bool PwMDoc::editEntry(const QString &oldCategory, const QString &newCategory,
1115 unsigned int index, PwMDataItem *d, bool updateMeta) 1115 unsigned int index, PwMDataItem *d, bool updateMeta)
1116{ 1116{
1117 PWM_ASSERT(d); 1117 PWM_ASSERT(d);
1118 unsigned int oldCat = 0; 1118 unsigned int oldCat = 0;
1119 1119
1120 if (!findCategory(oldCategory, &oldCat)) { 1120 if (!findCategory(oldCategory, &oldCat)) {
1121 BUG(); 1121 BUG();
1122 return false; 1122 return false;
1123 } 1123 }
1124 1124
1125 return editEntry(oldCat, newCategory, index, d, updateMeta); 1125 return editEntry(oldCat, newCategory, index, d, updateMeta);
1126} 1126}
1127 1127
1128bool PwMDoc::editEntry(unsigned int oldCategory, const QString &newCategory, 1128bool PwMDoc::editEntry(unsigned int oldCategory, const QString &newCategory,
1129 unsigned int index, PwMDataItem *d, bool updateMeta) 1129 unsigned int index, PwMDataItem *d, bool updateMeta)
1130{ 1130{
1131 if (isDeepLocked()) 1131 if (isDeepLocked())
1132 return false; 1132 return false;
1133 if (updateMeta) { 1133 if (updateMeta) {
1134 d->meta.update = QDateTime::currentDateTime(); 1134 d->meta.update = QDateTime::currentDateTime();
1135 if (d->meta.create.isNull()) { 1135 if (d->meta.create.isNull()) {
1136 d->meta.create = d->meta.update; 1136 d->meta.create = d->meta.update;
1137 } 1137 }
1138 } 1138 }
1139 if (dti.dta[oldCategory].name != newCategory.latin1()) { 1139 if (dti.dta[oldCategory].name != newCategory.latin1()) {
1140 // the user changed the category. 1140 // the user changed the category.
1141 PwMerror ret; 1141 PwMerror ret;
1142 d->rev = 0; 1142 d->rev = 0;
1143 ret = addEntry(newCategory, d, true, false); 1143 ret = addEntry(newCategory, d, true, false);
1144 if (ret != e_success) 1144 if (ret != e_success)
1145 return false; 1145 return false;
1146 if (!delEntry(oldCategory, index, true)) 1146 if (!delEntry(oldCategory, index, true))
1147 return false; 1147 return false;
1148 } else { 1148 } else {
1149 d->rev = dti.dta[oldCategory].d[index].rev + 1; // increment revision counter. 1149 d->rev = dti.dta[oldCategory].d[index].rev + 1; // increment revision counter.
1150 dti.dta[oldCategory].d[index] = *d; 1150 dti.dta[oldCategory].d[index] = *d;
1151 } 1151 }
1152 flagDirty(); 1152 flagDirty();
1153 return true; 1153 return true;
1154} 1154}
1155 1155
1156unsigned int PwMDoc::numEntries(const QString &category) 1156unsigned int PwMDoc::numEntries(const QString &category)
1157{ 1157{
1158 unsigned int cat = 0; 1158 unsigned int cat = 0;
1159 1159
1160 if (!findCategory(category, &cat)) { 1160 if (!findCategory(category, &cat)) {
1161 BUG(); 1161 BUG();
1162 return 0; 1162 return 0;
1163 } 1163 }
1164 1164
1165 return numEntries(cat); 1165 return numEntries(cat);
1166} 1166}
1167 1167
1168bool PwMDoc::serializeDta(string *d) 1168bool PwMDoc::serializeDta(string *d)
1169{ 1169{
1170 PWM_ASSERT(d); 1170 PWM_ASSERT(d);
1171 Serializer ser; 1171 Serializer ser;
1172 if (!ser.serialize(dti)) 1172 if (!ser.serialize(dti))
1173 return false; 1173 return false;
1174 d->assign(ser.getXml()); 1174 d->assign(ser.getXml());
1175 if (!d->size()) 1175 if (!d->size())
1176 return false; 1176 return false;
1177 return true; 1177 return true;
1178} 1178}
1179 1179
1180bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked) 1180bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked)
1181{ 1181{
1182 PWM_ASSERT(d); 1182 PWM_ASSERT(d);
1183#ifndef PWM_EMBEDDED 1183#ifndef PWM_EMBEDDED
1184 try { 1184 try {
1185 1185
1186 Serializer ser(d->c_str()); 1186 Serializer ser(d->c_str());
1187 ser.setDefaultLockStat(entriesLocked); 1187 ser.setDefaultLockStat(entriesLocked);
1188 if (!ser.deSerialize(&dti)) 1188 if (!ser.deSerialize(&dti))
1189 return false; 1189 return false;
1190 } catch (PwMException) { 1190 } catch (PwMException) {
1191 return false; 1191 return false;
1192 } 1192 }
1193#else 1193#else
1194 Serializer ser(d->c_str()); 1194 Serializer ser(d->c_str());
1195 ser.setDefaultLockStat(entriesLocked); 1195 ser.setDefaultLockStat(entriesLocked);
1196 if (!ser.deSerialize(&dti)) 1196 if (!ser.deSerialize(&dti))
1197 return false; 1197 return false;
1198#endif 1198#endif
1199 1199
1200 emitDataChanged(this); 1200 emitDataChanged(this);
1201 return true; 1201 return true;
1202} 1202}
1203 1203
1204bool PwMDoc::getEntry(const QString &category, unsigned int index, 1204bool PwMDoc::getEntry(const QString &category, unsigned int index,
1205 PwMDataItem * d, bool unlockIfLocked) 1205 PwMDataItem * d, bool unlockIfLocked)
1206{ 1206{
1207 PWM_ASSERT(d); 1207 PWM_ASSERT(d);
1208 unsigned int cat = 0; 1208 unsigned int cat = 0;
1209 1209
1210 if (!findCategory(category, &cat)) { 1210 if (!findCategory(category, &cat)) {
1211 BUG(); 1211 BUG();
1212 return false; 1212 return false;
1213 } 1213 }
1214 1214
1215 return getEntry(cat, index, d, unlockIfLocked); 1215 return getEntry(cat, index, d, unlockIfLocked);
1216} 1216}
1217 1217
1218bool PwMDoc::getEntry(unsigned int category, unsigned int index, 1218bool PwMDoc::getEntry(unsigned int category, unsigned int index,
1219 PwMDataItem *d, bool unlockIfLocked) 1219 PwMDataItem *d, bool unlockIfLocked)
1220{ 1220{
1221 if (index > dti.dta[category].d.size() - 1) 1221 if (index > dti.dta[category].d.size() - 1)
1222 return false; 1222 return false;
1223 1223
1224 bool locked = isLocked(category, index); 1224 bool locked = isLocked(category, index);
1225 if (locked) { 1225 if (locked) {
1226 /* this entry is locked. We don't return a password, 1226 /* this entry is locked. We don't return a password,
1227 * until it's unlocked by the user by inserting 1227 * until it's unlocked by the user by inserting
1228 * chipcard or entering the mpw 1228 * chipcard or entering the mpw
1229 */ 1229 */
1230 if (unlockIfLocked) { 1230 if (unlockIfLocked) {
1231 if (!lockAt(category, index, false)) { 1231 if (!lockAt(category, index, false)) {
1232 return false; 1232 return false;
1233 } 1233 }
1234 locked = false; 1234 locked = false;
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 *d = dti.dta[category].d[index]; 1238 *d = dti.dta[category].d[index];
1239 if (locked) 1239 if (locked)
1240 d->pw = LOCKED_STRING.latin1(); 1240 d->pw = LOCKED_STRING.latin1();
1241 1241
1242 return true; 1242 return true;
1243} 1243}
1244PwMerror PwMDoc::getCommentByLvp(const QString &category, int listViewPos, 1244PwMerror PwMDoc::getCommentByLvp(const QString &category, int listViewPos,
1245 string *foundComment) 1245 string *foundComment)
1246{ 1246{
1247 PWM_ASSERT(foundComment); 1247 PWM_ASSERT(foundComment);
1248 unsigned int cat = 0; 1248 unsigned int cat = 0;
1249 1249
1250 if (!findCategory(category, &cat)) 1250 if (!findCategory(category, &cat))
1251 return e_invalidArg; 1251 return e_invalidArg;
1252 1252
1253 unsigned int i, entries = numEntries(cat); 1253 unsigned int i, entries = numEntries(cat);
1254 for (i = 0; i < entries; ++i) { 1254 for (i = 0; i < entries; ++i) {
1255 if (dti.dta[cat].d[i].listViewPos == listViewPos) { 1255 if (dti.dta[cat].d[i].listViewPos == listViewPos) {
1256 *foundComment = dti.dta[cat].d[i].comment; 1256 *foundComment = dti.dta[cat].d[i].comment;
1257 if (dti.dta[cat].d[i].binary) 1257 if (dti.dta[cat].d[i].binary)
1258 return e_binEntry; 1258 return e_binEntry;
1259 return e_normalEntry; 1259 return e_normalEntry;
1260 } 1260 }
1261 } 1261 }
1262 BUG(); 1262 BUG();
1263 return e_generic; 1263 return e_generic;
1264} 1264}
1265 1265
1266PwMerror PwMDoc::getCommentByLvp_long(const QString &category, int listViewPos, 1266PwMerror PwMDoc::getCommentByLvp_long(const QString &category, int listViewPos,
1267 string *foundComment) 1267 string *foundComment)
1268{ 1268{
1269 PWM_ASSERT(foundComment); 1269 PWM_ASSERT(foundComment);
1270 unsigned int cat = 0; 1270 unsigned int cat = 0;
1271 1271
1272 if (!findCategory(category, &cat)) 1272 if (!findCategory(category, &cat))
1273 return e_invalidArg; 1273 return e_invalidArg;
1274 1274
1275 unsigned int i, entries = numEntries(cat); 1275 unsigned int i, entries = numEntries(cat);
1276 for (i = 0; i < entries; ++i) { 1276 for (i = 0; i < entries; ++i) {
1277 if (dti.dta[cat].d[i].listViewPos == listViewPos) { 1277 if (dti.dta[cat].d[i].listViewPos == listViewPos) {
1278 if (dti.dta[cat].d[i].binary) 1278 if (dti.dta[cat].d[i].binary)
1279 return e_binEntry; 1279 return e_binEntry;
1280 PwMCategoryItem* catItem = getCategoryEntry(cat); 1280 PwMCategoryItem* catItem = getCategoryEntry(cat);
1281 QString retval; 1281 QString retval;
1282 QString tempval = QString (dti.dta[cat].d[i].desc.c_str()); 1282 QString tempval = QString (dti.dta[cat].d[i].desc.c_str());
1283 if ( !tempval.isEmpty() ) { 1283 if ( !tempval.isEmpty() ) {
1284 retval += "<b>" +QString ( catItem->desc_text.c_str() )+ ":</b> "+ tempval+"<br>" ; 1284 retval += "<b>" +QString ( catItem->desc_text.c_str() )+ ":</b> "+ tempval+"<br>" ;
1285 } 1285 }
1286 tempval = QString (dti.dta[cat].d[i].name.c_str()); 1286 tempval = QString (dti.dta[cat].d[i].name.c_str());
1287 if ( !tempval.isEmpty() ) { 1287 if ( !tempval.isEmpty() ) {
1288 retval += "<b>" +QString ( catItem->name_text.c_str() ) + ":</b> "+ tempval+"<br>" ; 1288 retval += "<b>" +QString ( catItem->name_text.c_str() ) + ":</b> "+ tempval+"<br>" ;
1289 } 1289 }
1290 tempval = QString (dti.dta[cat].d[i].pw.c_str()); 1290 tempval = QString (dti.dta[cat].d[i].pw.c_str());
1291 if ( !tempval.isEmpty() ) { 1291 if ( !tempval.isEmpty() ) {
1292 if ( dti.dta[cat].d[i].lockStat ) 1292 if ( dti.dta[cat].d[i].lockStat )
1293 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + i18n("<LOCKED>") +"<br>" ; 1293 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ": " + i18n("LOCKED") +"</b><br>" ;
1294 else 1294 else
1295 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + tempval+"<br>" ; 1295 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + tempval+"<br>" ;
1296 } 1296 }
1297 tempval = QString (dti.dta[cat].d[i].url.c_str()); 1297 tempval = QString (dti.dta[cat].d[i].url.c_str());
1298 if ( !tempval.isEmpty() ) { 1298 if ( !tempval.isEmpty() ) {
1299 retval += "<b>" +i18n("URL:")+ "</b> " + tempval+"<br>" ; 1299 retval += "<b>" +i18n("URL:")+ "</b> " + tempval+"<br>" ;
1300 } 1300 }
1301 tempval = QString (dti.dta[cat].d[i].launcher.c_str()); 1301 tempval = QString (dti.dta[cat].d[i].launcher.c_str());
1302 if ( !tempval.isEmpty() ) { 1302 if ( !tempval.isEmpty() ) {
1303 retval += "<b>" +i18n("Launcher:")+ "</b> " + tempval+"<br>" ; 1303 retval += "<b>" +i18n("Launcher:")+ "</b> " + tempval+"<br>" ;
1304 } 1304 }
1305 tempval = QString (dti.dta[cat].d[i].comment.c_str()); 1305 tempval = QString (dti.dta[cat].d[i].comment.c_str());
1306 if ( !tempval.isEmpty() ) { 1306 if ( !tempval.isEmpty() ) {
1307 tempval.replace(QRegExp ( "\n" ), "<br>" ); 1307 tempval.replace(QRegExp ( "\n" ), "<br>" );
1308 retval += "<b>" +i18n("Comment:")+ "</b><br>" + tempval+"<br>" ; 1308 retval += "<b>" +i18n("Comment:")+ "</b><br>" + tempval+"<br>" ;
1309 } 1309 }
1310 1310
1311 string ret ( retval.latin1() ); 1311 string ret ( retval.latin1() );
1312 1312
1313 1313
1314 // *foundComment = dti.dta[cat].d[i].comment; 1314 // *foundComment = dti.dta[cat].d[i].comment;
1315 *foundComment = ret; 1315 *foundComment = ret;
1316 return e_normalEntry; 1316 return e_normalEntry;
1317 } 1317 }
1318 } 1318 }
1319 BUG(); 1319 BUG();
1320 return e_generic; 1320 return e_generic;
1321} 1321}
1322 1322
1323bool PwMDoc::compressDta(string *d, char algo) 1323bool PwMDoc::compressDta(string *d, char algo)
1324{ 1324{
1325 PWM_ASSERT(d); 1325 PWM_ASSERT(d);
1326 switch (algo) { 1326 switch (algo) {
1327 case PWM_COMPRESS_GZIP: { 1327 case PWM_COMPRESS_GZIP: {
1328 CompressGzip comp; 1328 CompressGzip comp;
1329 return comp.compress(d); 1329 return comp.compress(d);
1330 } 1330 }
1331#ifndef PWM_EMBEDDED 1331#ifndef PWM_EMBEDDED
1332 case PWM_COMPRESS_BZIP2: { 1332 case PWM_COMPRESS_BZIP2: {
1333 CompressBzip2 comp; 1333 CompressBzip2 comp;
1334 return comp.compress(d); 1334 return comp.compress(d);
1335 } 1335 }
1336#endif 1336#endif
1337 case PWM_COMPRESS_NONE: { 1337 case PWM_COMPRESS_NONE: {
1338 return true; 1338 return true;
1339 } default: { 1339 } default: {
1340 BUG(); 1340 BUG();
1341 } 1341 }
1342 } 1342 }
1343 return false; 1343 return false;
1344} 1344}
1345 1345
1346bool PwMDoc::decompressDta(string *d, char algo) 1346bool PwMDoc::decompressDta(string *d, char algo)
1347{ 1347{
1348 PWM_ASSERT(d); 1348 PWM_ASSERT(d);
1349 switch (algo) { 1349 switch (algo) {
1350 case PWM_COMPRESS_GZIP: { 1350 case PWM_COMPRESS_GZIP: {
1351 CompressGzip comp; 1351 CompressGzip comp;
1352 return comp.decompress(d); 1352 return comp.decompress(d);
1353 } 1353 }
1354#ifndef PWM_EMBEDDED 1354#ifndef PWM_EMBEDDED
1355 case PWM_COMPRESS_BZIP2: { 1355 case PWM_COMPRESS_BZIP2: {
1356 CompressBzip2 comp; 1356 CompressBzip2 comp;
1357 return comp.decompress(d); 1357 return comp.decompress(d);
1358 } 1358 }
1359#endif 1359#endif
1360 case PWM_COMPRESS_NONE: { 1360 case PWM_COMPRESS_NONE: {
1361 return true; 1361 return true;
1362 } 1362 }
1363 } 1363 }
1364 return false; 1364 return false;
1365} 1365}
1366 1366
1367PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo, 1367PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo,
1368 char hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase 1368 char hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
1369) 1369)
1370{ 1370{
1371 PWM_ASSERT(d); 1371 PWM_ASSERT(d);
1372 PWM_ASSERT(pw); 1372 PWM_ASSERT(pw);
1373 PWM_ASSERT(f); 1373 PWM_ASSERT(f);
1374 1374
1375 size_t encSize; 1375 size_t encSize;
1376 byte *encrypted = 0; 1376 byte *encrypted = 0;
1377 1377
1378 switch (algo) { 1378 switch (algo) {
1379 case PWM_CRYPT_BLOWFISH: { 1379 case PWM_CRYPT_BLOWFISH: {
1380 Blowfish::padNull(d); 1380 Blowfish::padNull(d);
1381 encSize = d->length(); 1381 encSize = d->length();
1382 encrypted = new byte[encSize]; 1382 encrypted = new byte[encSize];
1383 Blowfish bf; 1383 Blowfish bf;
1384 if (bf.bf_setkey((byte *) pw->latin1(), pw->length())) { 1384 if (bf.bf_setkey((byte *) pw->latin1(), pw->length())) {
1385 delete [] encrypted; 1385 delete [] encrypted;
1386 return e_weakPw; 1386 return e_weakPw;
1387 } 1387 }
1388 bf.bf_encrypt((byte *) encrypted, (byte *) d->c_str(), encSize); 1388 bf.bf_encrypt((byte *) encrypted, (byte *) d->c_str(), encSize);
1389 break; 1389 break;
1390 } 1390 }
1391 case PWM_CRYPT_AES128: 1391 case PWM_CRYPT_AES128:
1392 /*... fall through */ 1392 /*... fall through */
1393 case PWM_CRYPT_AES192: 1393 case PWM_CRYPT_AES192:
1394 case PWM_CRYPT_AES256: 1394 case PWM_CRYPT_AES256:
1395 case PWM_CRYPT_3DES: 1395 case PWM_CRYPT_3DES:
1396 case PWM_CRYPT_TWOFISH: 1396 case PWM_CRYPT_TWOFISH:
1397 case PWM_CRYPT_TWOFISH128: { 1397 case PWM_CRYPT_TWOFISH128: {
1398 if (!LibGCryptIf::available()) 1398 if (!LibGCryptIf::available())
1399 return e_cryptNotImpl; 1399 return e_cryptNotImpl;
1400 LibGCryptIf gc; 1400 LibGCryptIf gc;
1401 PwMerror err; 1401 PwMerror err;
1402 unsigned char *plain = new unsigned char[d->length() + 1024]; 1402 unsigned char *plain = new unsigned char[d->length() + 1024];
1403 memcpy(plain, d->c_str(), d->length()); 1403 memcpy(plain, d->c_str(), d->length());
1404 err = gc.encrypt(&encrypted, 1404 err = gc.encrypt(&encrypted,
1405 &encSize, 1405 &encSize,
1406 plain, 1406 plain,
1407 d->length(), 1407 d->length(),
1408 reinterpret_cast<const unsigned char *>(pw->latin1()), 1408 reinterpret_cast<const unsigned char *>(pw->latin1()),
1409 pw->length(), 1409 pw->length(),
1410 algo, 1410 algo,
1411 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase 1411 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
1412 ); 1412 );
1413 delete [] plain; 1413 delete [] plain;
1414 if (err != e_success) 1414 if (err != e_success)
1415 return e_cryptNotImpl; 1415 return e_cryptNotImpl;
1416 break; 1416 break;
1417 } 1417 }
1418 default: { 1418 default: {
1419 delete_ifnot_null_array(encrypted); 1419 delete_ifnot_null_array(encrypted);
1420 return e_cryptNotImpl; 1420 return e_cryptNotImpl;
1421 } } 1421 } }
1422 1422
1423 // write encrypted data to file 1423 // write encrypted data to file
1424 if (f->writeBlock(reinterpret_cast<const char *>(encrypted), 1424 if (f->writeBlock(reinterpret_cast<const char *>(encrypted),
1425 static_cast<Q_ULONG>(encSize)) 1425 static_cast<Q_ULONG>(encSize))
1426 != static_cast<Q_LONG>(encSize)) { 1426 != static_cast<Q_LONG>(encSize)) {
1427 delete_ifnot_null_array(encrypted); 1427 delete_ifnot_null_array(encrypted);
1428 return e_writeFile; 1428 return e_writeFile;
1429 } 1429 }
1430 delete_ifnot_null_array(encrypted); 1430 delete_ifnot_null_array(encrypted);
1431 return e_success; 1431 return e_success;
1432} 1432}
1433 1433
1434PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, 1434PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
1435 char algo, 1435 char algo,
1436 char hashalgo, //US BUG: pass _hashalgo because we need it in hashPassphrase 1436 char hashalgo, //US BUG: pass _hashalgo because we need it in hashPassphrase
1437 QFile *f) 1437 QFile *f)
1438{ 1438{
1439 PWM_ASSERT(d); 1439 PWM_ASSERT(d);
1440 PWM_ASSERT(pw); 1440 PWM_ASSERT(pw);
1441 PWM_ASSERT(f); 1441 PWM_ASSERT(f);
1442 1442
1443 unsigned int cryptLen = f->size() - pos; 1443 unsigned int cryptLen = f->size() - pos;
1444 byte *encrypted = new byte[cryptLen]; 1444 byte *encrypted = new byte[cryptLen];
1445 byte *decrypted = new byte[cryptLen]; 1445 byte *decrypted = new byte[cryptLen];
1446 1446
1447 f->at(pos); 1447 f->at(pos);
1448#ifndef PWM_EMBEDDED 1448#ifndef PWM_EMBEDDED
1449 if (f->readBlock(reinterpret_cast<char *>(encrypted), 1449 if (f->readBlock(reinterpret_cast<char *>(encrypted),
1450 static_cast<Q_ULONG>(cryptLen)) 1450 static_cast<Q_ULONG>(cryptLen))
1451 != static_cast<Q_LONG>(cryptLen)) { 1451 != static_cast<Q_LONG>(cryptLen)) {
1452 delete [] encrypted; 1452 delete [] encrypted;
1453 delete [] decrypted; 1453 delete [] decrypted;
1454 return e_readFile; 1454 return e_readFile;
1455 } 1455 }
1456#else 1456#else
1457 if (f->readBlock((char *)(encrypted), 1457 if (f->readBlock((char *)(encrypted),
1458 (unsigned long)(cryptLen)) 1458 (unsigned long)(cryptLen))
1459 != (long)(cryptLen)) { 1459 != (long)(cryptLen)) {
1460 delete [] encrypted; 1460 delete [] encrypted;
1461 delete [] decrypted; 1461 delete [] decrypted;
1462 return e_readFile; 1462 return e_readFile;
1463 } 1463 }
1464#endif 1464#endif
1465 switch (algo) { 1465 switch (algo) {
1466 case PWM_CRYPT_BLOWFISH: { 1466 case PWM_CRYPT_BLOWFISH: {
1467 Blowfish bf; 1467 Blowfish bf;
1468 bf.bf_setkey((byte *) pw->latin1(), pw->length()); 1468 bf.bf_setkey((byte *) pw->latin1(), pw->length());
1469 bf.bf_decrypt(decrypted, encrypted, cryptLen); 1469 bf.bf_decrypt(decrypted, encrypted, cryptLen);
1470 break; 1470 break;
1471 } 1471 }
1472 case PWM_CRYPT_AES128: 1472 case PWM_CRYPT_AES128:
1473 /*... fall through */ 1473 /*... fall through */
1474 case PWM_CRYPT_AES192: 1474 case PWM_CRYPT_AES192:
1475 case PWM_CRYPT_AES256: 1475 case PWM_CRYPT_AES256:
1476 case PWM_CRYPT_3DES: 1476 case PWM_CRYPT_3DES:
1477 case PWM_CRYPT_TWOFISH: 1477 case PWM_CRYPT_TWOFISH:
1478 case PWM_CRYPT_TWOFISH128: { 1478 case PWM_CRYPT_TWOFISH128: {
1479 if (!LibGCryptIf::available()) 1479 if (!LibGCryptIf::available())
1480 return e_cryptNotImpl; 1480 return e_cryptNotImpl;
1481 LibGCryptIf gc; 1481 LibGCryptIf gc;
1482 PwMerror err; 1482 PwMerror err;
1483 err = gc.decrypt(&decrypted, 1483 err = gc.decrypt(&decrypted,
1484 &cryptLen, 1484 &cryptLen,
1485 encrypted, 1485 encrypted,
1486 cryptLen, 1486 cryptLen,
1487 reinterpret_cast<const unsigned char *>(pw->latin1()), 1487 reinterpret_cast<const unsigned char *>(pw->latin1()),
1488 pw->length(), 1488 pw->length(),
1489 algo, 1489 algo,
1490 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase 1490 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
1491); 1491);
1492 if (err != e_success) { 1492 if (err != e_success) {
1493 delete [] encrypted; 1493 delete [] encrypted;
1494 delete [] decrypted; 1494 delete [] decrypted;
1495 return e_cryptNotImpl; 1495 return e_cryptNotImpl;
1496 } 1496 }
1497 break; 1497 break;
1498 } 1498 }
1499 default: { 1499 default: {
1500 delete [] encrypted; 1500 delete [] encrypted;
1501 delete [] decrypted; 1501 delete [] decrypted;
1502 return e_cryptNotImpl; 1502 return e_cryptNotImpl;
1503 } } 1503 } }
1504 delete [] encrypted; 1504 delete [] encrypted;
1505#ifndef PWM_EMBEDDED 1505#ifndef PWM_EMBEDDED
1506 d->assign(reinterpret_cast<const char *>(decrypted), 1506 d->assign(reinterpret_cast<const char *>(decrypted),
1507 static_cast<string::size_type>(cryptLen)); 1507 static_cast<string::size_type>(cryptLen));
1508#else 1508#else
1509 d->assign((const char *)(decrypted), 1509 d->assign((const char *)(decrypted),
1510 (string::size_type)(cryptLen)); 1510 (string::size_type)(cryptLen));
1511#endif 1511#endif
1512 delete [] decrypted; 1512 delete [] decrypted;
1513 if (algo == PWM_CRYPT_BLOWFISH) { 1513 if (algo == PWM_CRYPT_BLOWFISH) {
1514 if (!Blowfish::unpadNull(d)) { 1514 if (!Blowfish::unpadNull(d)) {
1515 BUG(); 1515 BUG();
1516 return e_readFile; 1516 return e_readFile;
1517 } 1517 }
1518 } 1518 }
1519 return e_success; 1519 return e_success;
1520} 1520}
1521 1521
1522PwMerror PwMDoc::checkDataHash(char dataHashType, const string *dataHash, 1522PwMerror PwMDoc::checkDataHash(char dataHashType, const string *dataHash,
1523 const string *dataStream) 1523 const string *dataStream)
1524{ 1524{
1525 PWM_ASSERT(dataHash); 1525 PWM_ASSERT(dataHash);
1526 PWM_ASSERT(dataStream); 1526 PWM_ASSERT(dataStream);
1527 switch(dataHashType) { 1527 switch(dataHashType) {
1528 case PWM_HASH_SHA1: { 1528 case PWM_HASH_SHA1: {
1529 Sha1 hash; 1529 Sha1 hash;
1530 hash.sha1_write((byte*)dataStream->c_str(), dataStream->length()); 1530 hash.sha1_write((byte*)dataStream->c_str(), dataStream->length());
1531 string ret = hash.sha1_read(); 1531 string ret = hash.sha1_read();
1532 if (ret != *dataHash) 1532 if (ret != *dataHash)
1533 return e_fileCorrupt; 1533 return e_fileCorrupt;
1534 break; 1534 break;
1535 } 1535 }
1536 case PWM_HASH_SHA256: 1536 case PWM_HASH_SHA256:
1537 /*... fall through */ 1537 /*... fall through */
1538 case PWM_HASH_SHA384: 1538 case PWM_HASH_SHA384:
1539 case PWM_HASH_SHA512: 1539 case PWM_HASH_SHA512:
1540 case PWM_HASH_MD5: 1540 case PWM_HASH_MD5:
1541 case PWM_HASH_RMD160: 1541 case PWM_HASH_RMD160:
1542 case PWM_HASH_TIGER: { 1542 case PWM_HASH_TIGER: {
1543 if (!LibGCryptIf::available()) 1543 if (!LibGCryptIf::available())
1544 return e_hashNotImpl; 1544 return e_hashNotImpl;
1545 LibGCryptIf gc; 1545 LibGCryptIf gc;
1546 PwMerror err; 1546 PwMerror err;
1547 unsigned char *buf; 1547 unsigned char *buf;
1548 size_t hashLen; 1548 size_t hashLen;
1549 err = gc.hash(&buf, 1549 err = gc.hash(&buf,
1550 &hashLen, 1550 &hashLen,
1551 reinterpret_cast<const unsigned char *>(dataStream->c_str()), 1551 reinterpret_cast<const unsigned char *>(dataStream->c_str()),
1552 dataStream->length(), 1552 dataStream->length(),
1553 dataHashType); 1553 dataHashType);
1554 if (err != e_success) 1554 if (err != e_success)
1555 return e_hashNotImpl; 1555 return e_hashNotImpl;
1556 string calcHash(reinterpret_cast<const char *>(buf), 1556 string calcHash(reinterpret_cast<const char *>(buf),
1557 static_cast<string::size_type>(hashLen)); 1557 static_cast<string::size_type>(hashLen));
1558 delete [] buf; 1558 delete [] buf;
1559 if (calcHash != *dataHash) 1559 if (calcHash != *dataHash)
1560 return e_fileCorrupt; 1560 return e_fileCorrupt;
1561 break; 1561 break;
1562 } 1562 }
1563 default: 1563 default:
1564 return e_hashNotImpl; 1564 return e_hashNotImpl;
1565 } 1565 }
1566 return e_success; 1566 return e_success;
1567} 1567}
1568 1568
1569bool PwMDoc::lockAt(unsigned int category, unsigned int index, 1569bool PwMDoc::lockAt(unsigned int category, unsigned int index,
1570 bool lock) 1570 bool lock)
1571{ 1571{
1572 if (index >= numEntries(category)) { 1572 if (index >= numEntries(category)) {
1573 BUG(); 1573 BUG();
1574 return false; 1574 return false;
1575 } 1575 }
1576 if (lock == dti.dta[category].d[index].lockStat) 1576 if (lock == dti.dta[category].d[index].lockStat)
1577 return true; 1577 return true;
1578 1578
1579 if (!lock && currentPw != "") { 1579 if (!lock && currentPw != "") {
1580 // "unlocking" and "password is already set" 1580 // "unlocking" and "password is already set"
1581 if (!getDocStatFlag(DOC_STAT_UNLOCK_WITHOUT_PW)) { 1581 if (!getDocStatFlag(DOC_STAT_UNLOCK_WITHOUT_PW)) {
1582 // unlocking without pw not allowed 1582 // unlocking without pw not allowed
1583 QString pw; 1583 QString pw;
1584 pw = requestMpw(getDocStatFlag(DOC_STAT_USE_CHIPCARD)); 1584 pw = requestMpw(getDocStatFlag(DOC_STAT_USE_CHIPCARD));
1585 if (pw != "") { 1585 if (pw != "") {
1586 if (pw != currentPw) { 1586 if (pw != currentPw) {
1587 wrongMpwMsgBox(getDocStatFlag(DOC_STAT_USE_CHIPCARD)); 1587 wrongMpwMsgBox(getDocStatFlag(DOC_STAT_USE_CHIPCARD));
1588 return false; 1588 return false;
1589 } else { 1589 } else {
1590 timer()->start(DocTimer::id_mpwTimer); 1590 timer()->start(DocTimer::id_mpwTimer);
1591 } 1591 }
1592 } else { 1592 } else {
1593 return false; 1593 return false;
1594 } 1594 }
1595 } else { 1595 } else {
1596 timer()->start(DocTimer::id_mpwTimer); 1596 timer()->start(DocTimer::id_mpwTimer);
1597 } 1597 }
1598 } 1598 }
1599 1599
1600 dti.dta[category].d[index].lockStat = lock; 1600 dti.dta[category].d[index].lockStat = lock;
1601 dti.dta[category].d[index].rev++; // increment revision counter. 1601 dti.dta[category].d[index].rev++; // increment revision counter.
1602 1602
1603 emitDataChanged(this); 1603 emitDataChanged(this);
1604 if (!lock) 1604 if (!lock)
1605 timer()->start(DocTimer::id_autoLockTimer); 1605 timer()->start(DocTimer::id_autoLockTimer);
1606 1606
1607 return true; 1607 return true;
1608 1608
1609} 1609}
1610 1610
1611bool PwMDoc::lockAt(const QString &category,unsigned int index, 1611bool PwMDoc::lockAt(const QString &category,unsigned int index,
1612 bool lock) 1612 bool lock)
1613{ 1613{
1614 unsigned int cat = 0; 1614 unsigned int cat = 0;
1615 1615
1616 if (!findCategory(category, &cat)) { 1616 if (!findCategory(category, &cat)) {
1617 BUG(); 1617 BUG();
1618 return false; 1618 return false;
1619 } 1619 }
1620 1620
1621 return lockAt(cat, index, lock); 1621 return lockAt(cat, index, lock);
1622} 1622}
1623 1623
1624bool PwMDoc::lockAll(bool lock) 1624bool PwMDoc::lockAll(bool lock)
1625{ 1625{
1626 if (!lock && isDeepLocked()) { 1626 if (!lock && isDeepLocked()) {
1627 PwMerror ret; 1627 PwMerror ret;
1628 ret = deepLock(false); 1628 ret = deepLock(false);
1629 if (ret != e_success) 1629 if (ret != e_success)
1630 return false; 1630 return false;
1631 return true; 1631 return true;
1632 } 1632 }
1633 if (isDocEmpty()) { 1633 if (isDocEmpty()) {
1634 return true; 1634 return true;
1635 } 1635 }
1636 if (!lock && currentPw != "") { 1636 if (!lock && currentPw != "") {
1637 // unlocking and password is already set 1637 // unlocking and password is already set
1638 if (!getDocStatFlag(DOC_STAT_UNLOCK_WITHOUT_PW)) { 1638 if (!getDocStatFlag(DOC_STAT_UNLOCK_WITHOUT_PW)) {
1639 // unlocking without pw not allowed 1639 // unlocking without pw not allowed
1640 QString pw; 1640 QString pw;
1641 pw = requestMpw(getDocStatFlag(DOC_STAT_USE_CHIPCARD)); 1641 pw = requestMpw(getDocStatFlag(DOC_STAT_USE_CHIPCARD));
1642 if (pw != "") { 1642 if (pw != "") {
1643 if (pw != currentPw) { 1643 if (pw != currentPw) {
1644 wrongMpwMsgBox(getDocStatFlag(DOC_STAT_USE_CHIPCARD)); 1644 wrongMpwMsgBox(getDocStatFlag(DOC_STAT_USE_CHIPCARD));
1645 return false; 1645 return false;
1646 } else { 1646 } else {
1647 timer()->start(DocTimer::id_mpwTimer); 1647 timer()->start(DocTimer::id_mpwTimer);
1648 } 1648 }
1649 } else { 1649 } else {
1650 return false; 1650 return false;
1651 } 1651 }
1652 } else { 1652 } else {
1653 timer()->start(DocTimer::id_mpwTimer); 1653 timer()->start(DocTimer::id_mpwTimer);
1654 } 1654 }
1655 } 1655 }
1656 1656
1657 vector<PwMCategoryItem>::iterator catBegin = dti.dta.begin(), 1657 vector<PwMCategoryItem>::iterator catBegin = dti.dta.begin(),
1658 catEnd = dti.dta.end(), 1658 catEnd = dti.dta.end(),
1659 catI = catBegin; 1659 catI = catBegin;
1660 vector<PwMDataItem>::iterator entrBegin, entrEnd, entrI; 1660 vector<PwMDataItem>::iterator entrBegin, entrEnd, entrI;
1661 while (catI != catEnd) { 1661 while (catI != catEnd) {
1662 entrBegin = catI->d.begin(); 1662 entrBegin = catI->d.begin();
1663 entrEnd = catI->d.end(); 1663 entrEnd = catI->d.end();
1664 entrI = entrBegin; 1664 entrI = entrBegin;
1665 while (entrI != entrEnd) { 1665 while (entrI != entrEnd) {
1666 entrI->lockStat = lock; 1666 entrI->lockStat = lock;
1667 entrI->rev++; // increment revision counter. 1667 entrI->rev++; // increment revision counter.
1668 ++entrI; 1668 ++entrI;
1669 } 1669 }
1670 ++catI; 1670 ++catI;
1671 } 1671 }
1672 1672
1673 emitDataChanged(this); 1673 emitDataChanged(this);
1674 if (lock) 1674 if (lock)
1675 timer()->stop(DocTimer::id_autoLockTimer); 1675 timer()->stop(DocTimer::id_autoLockTimer);
1676 else 1676 else
1677 timer()->start(DocTimer::id_autoLockTimer); 1677 timer()->start(DocTimer::id_autoLockTimer);