Commit Graph

413 Commits

Author SHA1 Message Date
Charles Brunet
4a870f61f1 Added option to minimize window when copying data to clipboard
https://github.com/keepassx/keepassx/pull/24
2013-10-29 20:54:56 +01:00
Felix Geyer
5daf0853c9 Coding style fixes. 2013-10-13 18:08:50 +02:00
Felix Geyer
7dde8a771f Use QUINT32_MAX in tests instead of hardcoding the number. 2013-10-12 19:11:57 +02:00
Felix Geyer
9c788a6e84 Support custom backends in Random.
Useful for tests.
2013-10-09 22:06:32 +02:00
Felix Geyer
67338aac7b Avoid using QApplication in core. 2013-10-08 17:37:12 +02:00
Felix Geyer
6504b6f2bd Drop Qt module name from include statements.
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Francois Ferrand
d2ab008aa0 Auto-reload settings. 2013-04-30 17:31:08 +02:00
Felix Geyer
5588792344 Make KeePass2XmlReader::parseGroup() safe against reordered xml elements. 2013-04-29 22:31:50 +02:00
Felix Geyer
61ee763515 Add Entry::copyDataFrom(). 2013-04-29 22:31:49 +02:00
Felix Geyer
fd18bc0330 Use standard GNU install dirs and make them overridable. 2013-04-29 22:17:31 +02:00
Francois Ferrand
d5c8787451 Detect background changes to database file.
This gives the option to reload the database.

TODO:
 - Settings for reloadBehavior (ask, reloadUnchanged, ignore)
 - Improve notification, by using a header instead of dialog: nicer, less
intrusive, gives more options to user, and works better when multiple databases
are open.
 - Keep tab order on reload.
2013-04-29 09:11:26 +02:00
Florian Geyer
b499a6df77 Fix coding style. 2013-04-27 11:40:10 +02:00
Florian Geyer
cabec57631 Make argument keys immutable. 2013-04-27 11:40:10 +02:00
Florian Geyer
63f7a0685f Small ArgumentParser refactoring. 2013-04-27 11:40:10 +02:00
Francois Ferrand
850c7c7ecf Option to automatically reopen databases which were last opened. 2013-04-24 13:30:30 +02:00
Florian Geyer
f0985ff9d9 Remember opened databases on quit.
Refs #36
2013-04-18 21:52:08 +02:00
Francois Ferrand
75f0d132e5 Add removeSharedEncryptionKeys() and removeStoredPermissions() 2013-04-18 17:57:00 +02:00
Francois Ferrand
ea992bc3e6 Support KeyPassHttp protocol.
Allows using passIfox (firefox) and Chromeipass (chrome).
2013-04-12 15:16:56 +02:00
Felix Geyer
fe42861bed Add safety check so we don't insert empty icons. 2013-04-07 19:37:44 +02:00
Felix Geyer
5a96e19ce9 Copy custom icons when copying/moving entries/groups to another database. 2013-04-07 18:32:43 +02:00
Florian Geyer
2558e6db79 First draft of an argument parser.
Possibility to set custom config path.
2013-04-06 11:00:45 +02:00
Felix Geyer
bee570c3cf Add Group::clone().
Move all the data we want to clone into a GroupData struct.
2013-04-04 21:48:55 +02:00
Felix Geyer
be288d26ca Change Entry::clone() to set a random uuid. 2013-04-04 21:25:11 +02:00
Felix Geyer
60335452a4 Add compiler flags to hide all symbols by default. 2013-03-30 00:14:32 +01:00
Felix Geyer
5550d7af0d Fix autotype test (build) failures on Mac OS and Windows.
We need to tell Windows what symbols the main program exports
and the autotype plugin imports.

On both systems the linker needs the path of the main program that
loads the plugin.
2013-03-29 16:27:02 +01:00
Felix Geyer
1c7e8f6921 Small optimizations. 2013-03-26 23:53:34 +01:00
Florian Geyer
97b488b2ba Ignore an unused variable. 2013-03-24 21:57:34 +01:00
Florian Geyer
13393ed2d3 Fix removal of history entries in release builds.
Closes #56
2013-03-24 21:57:34 +01:00
Felix Geyer
c7593a3047 Stop suppressing signals in Group dtor.
That way we emit entry/group removed signals.

Move cleanupParent() call to the bottom so we
maintain the group tree structure for objects that
connect to those signals.
2013-03-24 14:00:23 +01:00
Felix Geyer
72d17c045f Handle deleting groups more consistently.
Delete the entries and child groups in Group dtor
no what if the group has a database or not.
2013-03-24 14:00:23 +01:00
Felix Geyer
eb6612b787 Fix database icons license issues.
Pull C62_Tux.png, C63_Feather.png, C64_Apple.png, C65_Apple.png
and C65_W.png from the latest KeePass 2 version.

Replace C68_BlackBerry.png with another icon from openclipart.org.
It's unclear where this KeePass 2 icon is from.

Closes #69
2013-03-23 21:50:23 +01:00
Felix Geyer
2ed3201b14 Add PasswordGenerator backend.
Refs #52
2013-03-12 21:55:11 +01:00
Florian Geyer
e85dbda62a Update timeinfo when cloning an entry. 2012-11-06 23:34:16 +01:00
Felix Geyer
41973d0e92 Revert "Handle DeferredDelete events in Tools::wait()."
Caused a crash when performing auto-type from AutoTypeSelectDialog.

This reverts commit 6b3fed1ce5.
2012-11-03 15:12:04 +01:00
Florian Geyer
bd90ba9326 Move initial auto-type timeout to plugins. 2012-11-02 15:49:25 +01:00
Felix Geyer
6b3fed1ce5 Handle DeferredDelete events in Tools::wait(). 2012-11-02 15:43:45 +01:00
Felix Geyer
d7cbec1a02 Make sure that TestGui doesn't leave a temp file behind.
Swap the parent/child relationship between QTemporaryFile and Config
because the QTemporaryFile dtor is called before its chidren are destroyed.
2012-10-28 18:07:23 +01:00
Felix Geyer
606dbc6eb4 Add infrastructure for auto-type tests. 2012-10-28 15:33:44 +01:00
Florian Geyer
ddd5e8a209 Add menu entry to copy an entry attribute to clipboard. 2012-10-24 20:03:33 +02:00
Felix Geyer
18337927f5 Fix includes for ptrace(PT_DENY_ATTACH, ...). 2012-10-23 17:06:50 +02:00
Felix Geyer
59847f4f30 Make QSaveFile work on Windows when the target file already exists. 2012-10-22 17:48:13 +02:00
Florian Geyer
92bf7c94d0 Whitespace separated search terms are AND concatenated. 2012-10-21 21:09:27 +02:00
Felix Geyer
4d263a09db Include config-keepassx.h in Tools.cpp for the HAVE_* defines. 2012-10-21 19:24:17 +02:00
Felix Geyer
169e6327ea Disable core dumps and tracing on *nix.
But only when built in release mode.

Closes #4
2012-10-21 12:33:00 +02:00
Felix Geyer
7286b1847d Add Database::verifyKey().
And make Database::hasKey() const.
2012-10-12 12:10:41 +02:00
Florian Geyer
de1a94ff61 Add presets for expire date.
Closes #44
2012-08-18 17:33:41 +02:00
Florian Geyer
6c695e3fd0 Remember show toolbar option.
Closes #43
2012-08-15 19:50:31 +02:00
Felix Geyer
0bac9752ba Use QTime instead of QElapsedTimer with Qt 4.6.
The latter has been introduced in Qt 4.7.
2012-08-05 19:19:01 +02:00
Felix Geyer
8fb2f9db7c Move inline keyword to function definition. 2012-08-04 22:06:41 +02:00
Felix Geyer
668103a00f Show group and entry view context menus from MainWindow.
This allows us to drop the duplicate actions in DatabaseWidget.
2012-08-04 22:06:41 +02:00
Felix Geyer
e9a96ff80a Mark m_pixmapCacheKey as mutable so we don't have to const_cast. 2012-07-25 12:18:16 +02:00
Felix Geyer
92efb3d20b Move autoTypeSequence() and windowMatches() to the AutoType class. 2012-07-23 18:06:04 +02:00
Felix Geyer
ecea101962 Return Q_NULLPTR instead of 0 when the return type is a pointer. 2012-07-23 14:58:57 +02:00
Felix Geyer
7820bf2510 For global auto-type use the default sequence of the entry before the group. 2012-07-23 12:56:00 +02:00
Felix Geyer
33b4cd8636 Don't add new entries to EntryModel when in search mode.
Only allow moving entries from one group to the other.
2012-07-21 22:21:49 +02:00
Florian Geyer
f6e1af30b3 Move recycle bin creation method to Group class. 2012-07-21 11:58:00 +02:00
Felix Geyer
a50d2709e7 Replace EntryAttachments and EntryAttributes operator=() with copyDataFrom().
QObjects are not supposed to have assignment operators.
2012-07-20 12:15:19 +02:00
Felix Geyer
ef579cbe3c Refactor Entry::truncateHistory().
This allows us to drop Entry::getSize() and EntryAttachments::attachmentsSize()
which have weird semantics.
2012-07-20 00:45:34 +02:00
Felix Geyer
0c1fecfb2b const_cast "this" instead of the member variable. 2012-07-19 23:32:31 +02:00
Felix Geyer
308d3ad84b Use constructor initialization lists where possible. 2012-07-19 19:42:14 +02:00
Felix Geyer
4152e93bb7 Add a cache for FilePath::icon(). 2012-07-18 21:22:36 +02:00
Felix Geyer
f01076856b Don't add double "/" to paths. 2012-07-18 21:22:36 +02:00
Felix Geyer
2a45f57386 Support proper plugin finding.
So we don't have to hardcode the location anymore.
2012-07-18 21:22:36 +02:00
Felix Geyer
7fef3bd701 Rename DataPath to FilePath. 2012-07-18 21:22:26 +02:00
Felix Geyer
490414716d Generate new random transform seed when changing transform rounds. 2012-07-17 10:57:08 +02:00
Felix Geyer
66422437d3 Regenerate key in Database::setTransformRounds().
Merge Database::updateKey() into Database::setTransformRounds() and
regenerate the key if the database already has a key.

Closes #34
2012-07-17 10:33:54 +02:00
Felix Geyer
965dba63d7 Use Q_OS_MAC instead of the nonexistent Q_OS_MACOS.
Thanks to Richard Johnson for spotting this.

Closes #33
2012-07-16 17:49:12 +02:00
Felix Geyer
7db6850528 Add AutoTypeAssociations::removeEmpty(). 2012-07-16 17:37:18 +02:00
Felix Geyer
7abaf0e215 Fix bug in Entry::autoTypeSequence() with default window sequences.
When using the default sequence autoTypeSequence() returned an empty string.
2012-07-16 17:34:19 +02:00
Felix Geyer
f98d834edb Move Auto-Type associations handling from Entry into an own class. 2012-07-16 09:54:04 +02:00
Felix Geyer
f4a4930f42 Entry::autoTypeSequence() returns null string when no window matches.
Return QString() when a windowTitle is passed but doesn't match any
auto-type association.
2012-07-15 11:30:30 +02:00
Felix Geyer
bc207714da Add initial auto-type implementation.
The platform dependent bits are separated in plugins.
A plugin for X11 using Xlib is already done.
2012-07-12 22:33:20 +02:00
Felix Geyer
073f3f9dfc Add ListDeleter class.
A class that deletes all elements of a QList when it goes out of scope.
2012-07-12 22:28:44 +02:00
Felix Geyer
549c3ce598 Fix memory leak in QSaveFile. 2012-07-12 21:30:37 +02:00
Felix Geyer
9de4cbbbd6 Use Q_OS_* defines instead of Q_WS_*. 2012-07-12 13:58:40 +02:00
Felix Geyer
13eb1f6330 Add Tools::sleep() and Tools::wait(). 2012-07-12 13:51:50 +02:00
Felix Geyer
2f98d95b66 Import QSaveFile from libkdeqt5staging.
It's planned to become part of Qt 5.1.
2012-07-06 14:36:04 +02:00
Felix Geyer
d826ae5daf Add assert to make sure the temp file could be opened successfully. 2012-07-03 12:39:03 +02:00
Felix Geyer
6ca3b8aa81 Make google cpplint happy. 2012-07-02 20:00:06 +02:00
Felix Geyer
1b9c2bb16b Improve array size assert. 2012-07-01 22:21:49 +02:00
Felix Geyer
782223a643 Coding style fixes. 2012-07-01 21:58:45 +02:00
Felix Geyer
c844c6b712 Convert icon filename QVector to a plain char* array. 2012-07-01 21:35:07 +02:00
Felix Geyer
85031658d1 Add Q_STATIC_ASSERT macro, backported from Qt 5. 2012-07-01 21:27:11 +02:00
Felix Geyer
6ce53b142d clang: Use __has_feature() to detect C++11 features. 2012-07-01 20:24:43 +02:00
Felix Geyer
ee3bc89a54 Coding style fixes. 2012-06-30 00:22:07 +02:00
Felix Geyer
baa5a74ba0 Convert iconCount() and expiredIconIndex() to constants. 2012-06-29 15:22:43 +02:00
Felix Geyer
4e6cf15a09 Fix compiler warning about __GXX_EXPERIMENTAL_CXX0X__ being undefined. 2012-06-29 14:34:17 +02:00
Felix Geyer
2287250a07 Define COMPILER_EXPLICIT_OVERRIDES when using gcc >= 4.7. 2012-06-29 14:18:12 +02:00
Felix Geyer
68155e8f89 Make use of Q_NULLPTR. 2012-06-29 14:15:16 +02:00
Felix Geyer
af142fc433 Optionally enable C++ 11. 2012-06-29 14:14:58 +02:00
Florian Geyer
204822b66f Improve auto save handling. 2012-06-24 19:30:30 +02:00
Felix Geyer
b0ad864fe0 Always convert explicitly from QByteArray to QString. 2012-06-24 18:23:27 +02:00
Felix Geyer
f690522725 Coding style fixes. 2012-06-24 11:32:54 +02:00
Florian Geyer
a720903083 Use temporary settings file for gui test. 2012-06-14 23:07:49 +02:00
Thom Troy
bd5dd130e5 Add auto save on exit 2012-06-12 10:00:02 +02:00
Thom Troy
17f4e23215 Added automatically saving DB after change 2012-06-12 10:00:01 +02:00
Felix Geyer
d3fcf2e0c4 Move singleton instance code to static member functions. 2012-05-31 14:51:44 +02:00
Florian Geyer
cf5f56af6f Rename setting so it refers only to group expanded state changes. 2012-05-30 11:27:09 +02:00
Florian Geyer
5003499700 Add settings option if visual changes mark databases as modified. 2012-05-29 22:10:03 +02:00
Florian Geyer
6f48983efe Remember last opened files. 2012-05-27 23:41:33 +02:00
Felix Geyer
7194a3d7a8 Store defaults in Config. 2012-05-27 20:05:57 +02:00
Felix Geyer
de95b6c347 Add DataPath::icon() parameter to only use local icons. 2012-05-27 12:43:58 +02:00
Felix Geyer
c6253fc025 Make copy constructor and assignment operator of singleton classes private. 2012-05-26 16:45:59 +02:00
Felix Geyer
e323fd169e Use QDesktopServices::storageLocation() on Mac OS too. 2012-05-25 13:42:59 +02:00
Florian Geyer
b5249d196d Rename KeePassApp to Application and move it to gui directory. 2012-05-21 22:04:40 +02:00
Florian Geyer
d445bf1ecd Use a signal to connect to a slot in main window.
Coding style fixes.

http://gitorious.org/keepassx/keepassx/merge_requests/10
2012-05-21 22:04:40 +02:00
Tobias Tangemann
679398be00 Handle OSX Finder events 2012-05-21 22:04:40 +02:00
Felix Geyer
ca7c59d313 Fix data path on Mac OS. 2012-05-21 17:55:09 +02:00
Felix Geyer
5297722ede Include header cleanup. 2012-05-20 23:08:23 +02:00
Florian Geyer
4797926be6 History items can now be removed.
Refs #23
2012-05-20 13:07:45 +02:00
Florian Geyer
4ec9df76cd Add toHex function to Uuid. 2012-05-18 14:41:34 +02:00
Florian Geyer
d218924b4f Add expiry option to group edit. 2012-05-18 10:52:05 +02:00
Florian Geyer
810a6e4b39 Display history items.
Refs #23
2012-05-17 23:29:37 +02:00
Florian Geyer
eb82df5994 Add entry clone functionality. 2012-05-16 10:30:25 +02:00
Felix Geyer
5ef3cdb428 Add some more asserts to make sure we only store UTC QDateTimes. 2012-05-16 10:05:58 +02:00
Felix Geyer
ce268260b1 Display expired entries and groups struck out. 2012-05-15 20:02:08 +02:00
Florian Geyer
621ec80bbe Use static constants for default icon numbers. 2012-05-15 18:46:59 +02:00
Felix Geyer
b90807c4d3 Coding style fixes. 2012-05-15 17:48:48 +02:00
Felix Geyer
a407e0082b Coding style improvements. 2012-05-14 19:10:42 +02:00
Felix Geyer
cd41727583 Get rid of Database pointer in Metadata. 2012-05-14 17:04:05 +02:00
Felix Geyer
53fb28624e Fix memory leak in Entry::truncateHistory(). 2012-05-14 16:29:22 +02:00
Felix Geyer
b88a0d8de3 Coding style improvements. 2012-05-14 16:27:59 +02:00
Florian Geyer
a57e8f9864 Preserve order of custom icons.
Closes #25
2012-05-13 20:50:41 +02:00
Florian Geyer
6b6c109903 Add search.
Refs #24
2012-05-13 19:21:10 +02:00
Florian Geyer
746a535c7d Create recycle bin with search state and auto type disabled. 2012-05-13 19:03:41 +02:00
Felix Geyer
af726d465d Fix typo. 2012-05-13 13:33:55 +02:00
Florian Geyer
4807ec3368 Include groups in custom icon delete check.
Refs #22
2012-05-12 02:14:06 +02:00
Florian Geyer
e4b6289c0b Prevent deletion of custom icon if it is still used by other entries.
Refs #22
2012-05-12 00:30:29 +02:00
Florian Geyer
1c24b2c5c4 Add gui option for history max items and size to database settings widget. 2012-05-11 20:14:52 +02:00
Florian Geyer
1a74feb253 Improve history limits.
Closes #16
2012-05-11 20:14:43 +02:00
jacek81
8c87a87da6 Added history limits enforcement 2012-05-11 20:04:51 +02:00
Felix Geyer
860a2131b3 Emit dataChanged() when the entry icon has changed. 2012-05-11 14:14:12 +02:00
Felix Geyer
0b592c69b0 Emit defaultKeyModified() only when the data has actually changed. 2012-05-11 14:13:22 +02:00
Felix Geyer
587a647c11 New TODO comment style.
Qt Creator 2.5 is able to parse those.
2012-05-11 12:39:06 +02:00
Felix Geyer
cc6f524168 Add Tools::readFromDevice() and make FileKey use it. 2012-05-10 19:00:36 +02:00
Felix Geyer
6eebd95de1 Move FileKey::isHex() to Tools. 2012-05-10 18:34:51 +02:00
Felix Geyer
ce0007acd2 Improve file dialog filter for adding custom icons. 2012-05-10 18:09:42 +02:00
Felix Geyer
6234065898 Make sure TimeInfo only contains UTC values. 2012-05-09 23:16:32 +02:00
Andreas Piesk
7568582b05 compile with QT < 4.7 (RHEL6 an clones) 2012-05-09 22:15:28 +02:00
Felix Geyer
18c7fae463 Add icons used by KMessageWidget. 2012-05-03 00:15:31 +02:00
Felix Geyer
539ea5bd44 Add generic DataPath::icon() method. 2012-05-02 23:48:17 +02:00
Felix Geyer
739f4d97a6 Coding style fixes. 2012-05-02 17:04:03 +02:00
Felix Geyer
f89ffa10e6 Add Tools::readAllFromDevice().
Make KeePass2XmlReader::readCompressedBinary() use the new function.
2012-05-02 11:06:24 +02:00
Felix Geyer
599d60270d Coding style fixes. 2012-04-28 21:42:23 +02:00
Felix Geyer
1d39368f8d Support editing attribute values in a separate text edit. 2012-04-28 19:11:15 +02:00
Felix Geyer
7c094d4723 Add EntryAttributes::rename(). 2012-04-27 12:34:15 +02:00
Felix Geyer
de4b90cdf1 Copy custom icons when moved to another database.
Closes #9
2012-04-27 11:22:02 +02:00
Felix Geyer
c36481edae Support setting a new parent group with an empty db. 2012-04-27 10:50:32 +02:00
Felix Geyer
79b6ff99e4 Mark library include dirs as SYSTEM.
Compilers will suppress warnings from files in those directories.
2012-04-26 12:18:38 +02:00
Felix Geyer
7865f5eee9 Fix some pedantic compiler warnings. 2012-04-26 11:59:53 +02:00
Felix Geyer
9e0a6ad2d8 Add an assignment operator to Uuid and support serialization with QDataStream. 2012-04-25 00:15:40 +02:00
Felix Geyer
d5cd0dcd14 Add a method to get databases by uuid.
Each database gets a random uuid on construction which is not saved by
KeePass2XmlWriter and only valid until the database object is deleted.
2012-04-25 00:12:23 +02:00
Felix Geyer
0d20955920 Fix bug where index is wrong when a group is moved to the end from the same parent.
This triggered the bug:
group->setParent(group->parentGroup());

Then index was group->parentGroup()->children().size() instead of size()-1.
2012-04-25 00:10:06 +02:00
Felix Geyer
e026f3d1eb Create a history item when changing entries.
Closes #15
2012-04-23 21:20:05 +02:00
Felix Geyer
3df2ad35cb Constification and some style fixes. 2012-04-23 21:09:01 +02:00
Felix Geyer
f28f868671 Coding style fixes. 2012-04-23 17:02:09 +02:00
Felix Geyer
bddc29101c Introduce Group::aboutToMove() and moved() signals.
Emit them instead of remove/add when groups are moved within
a database.
2012-04-23 16:57:08 +02:00
Florian Geyer
222abe09d9 Make save order for deleted objects consistent. 2012-04-22 19:59:50 +02:00
Felix Geyer
ef26065a99 Update LocationChanged time when entries and groups are moved.
Closes #3
2012-04-22 12:10:21 +02:00
Felix Geyer
cc426d2453 Add missing check for group database. 2012-04-22 00:58:35 +02:00
Felix Geyer
0bcce7ce7f Remove some unnecessary initializations. 2012-04-22 00:38:21 +02:00
Felix Geyer
411617cc8b Add convenience function Database::addDeletedObject(const Uuid&).
Drop Group::addDeletedObject() and make Entry call the Database function
instead.
2012-04-22 00:29:39 +02:00
Florian Geyer
5dc21a191b Clean up group deletion. 2012-04-22 00:11:17 +02:00
Florian Geyer
8467e7756d Add ability to delete groups via gui. 2012-04-22 00:11:17 +02:00
Felix Geyer
19bacd6737 Use QPointer for Entry::m_lastTopVisibleEntry.
Closes #14
2012-04-22 00:10:04 +02:00
Felix Geyer
a3e7c93b59 Store group references in Metadata as QPointer.
QPointer sets itself to 0 when the referenced object has been deleted.

Refs #14
2012-04-22 00:07:27 +02:00
Felix Geyer
19a5aad90a Declare the TypeInfo for some classes/structs.
Qt's container classes benefit from this information.
2012-04-21 18:39:09 +02:00
Florian Geyer
258af265c7 Save reference to deleted entries in deletedObject list. 2012-04-21 17:28:44 +02:00
Florian Geyer
1fc5f7a69f Add database settings widget and ability to change transform rounds count. 2012-04-21 17:28:44 +02:00
Felix Geyer
8acd6f74d8 Support KeePass format 3.00 (used by KeePass2 >= 2.15).
Closes #6

Attachments are now stored in a pool under Metadata instead of in entries.
The protected flag of attachments isn't supported anymore.
New metadata attributes: color, historyMaxItems and historyMaxSize.
Dropped metadata attribute: autoEnableVisualHiding.
2012-04-21 16:45:46 +02:00
Florian Geyer
f8e2c95162 Add hasChild function to check for a child in a QObject tree. 2012-04-19 01:02:23 +02:00
Felix Geyer
246bc0115e More coding style fixes. 2012-04-19 00:25:57 +02:00
Felix Geyer
3d1fc6cd6d Set the group of the entry in Database::recycleEntry().
Drop Metadata::addEntryToRecycleBin() and add a non-const
Metadata::recycleBin() getter instead.
2012-04-18 23:27:14 +02:00
Florian Geyer
8735a4846c Move deleted entries to recycle bin if enabled. 2012-04-18 23:09:00 +02:00
Felix Geyer
2e011d5362 Improve code style. 2012-04-18 22:08:22 +02:00
Felix Geyer
cfe5b48bfd Handle Group::setIcon() manually instead of calling set().
That way we don't emit modified() in between setting the attributes.
2012-04-18 17:14:51 +02:00
Felix Geyer
ca5dd373ed Only disconnect m_db when it exists.
Previously we disconnected everyone when m_db == 0.
2012-04-18 17:07:40 +02:00
Florian Geyer
84d9d2ec47 Update timeinfo of group only when properties of the group itself change. 2012-04-18 17:03:58 +02:00
Florian Geyer
34204f3281 Disconnect entry from database, when removed. 2012-04-18 17:03:58 +02:00
Florian Geyer
d85e5d7560 Update connection of modified signals of entries when a parent group changes database. 2012-04-18 17:03:58 +02:00
Florian Geyer
d73cbafb8e Add slot to update the timeinfo of a group and connect it on modified signal.
Connect modified signal of entries directly to database, so timeinfo of group is not updated.
2012-04-18 17:03:58 +02:00
Florian Geyer
fc8f1231c6 Fix expiry time and bool not being updated. 2012-04-18 17:03:58 +02:00
Florian Geyer
46bbabbe3c Use UTC time spec. 2012-04-18 17:03:57 +02:00
Florian Geyer
ad865774d1 Add slot to update the timeinfo of an entry and connect it on modified signal. 2012-04-18 17:03:57 +02:00
Florian Geyer
eb4f82a7ed Add hasKey property to database and also make it accessible via the DatabaseWidget. 2012-04-18 17:03:57 +02:00
Felix Geyer
a5ac1f2e80 Call m_group->database() instead of keeping a reference to Database in Entries.
Previously we didn't update m_db when the database of the group changed.
2012-04-18 13:57:57 +02:00
Felix Geyer
38585663e1 Don't modify the protected status of default attributes.
They are handled by Metadata::protect*.
2012-04-14 19:41:56 +02:00
Felix Geyer
3d7479c67b Change EntryAttributes::copyFrom() to copyCustomKeysFrom().
That way we don't overwrite the default entries in EditEntryWidget::saveEntry().
2012-04-14 19:38:45 +02:00
Felix Geyer
51854a7a45 Only emit signals from clear() when the internal data is non-empty.
Also make sure that m_attributes always contains the default attributes.
2012-04-14 18:47:40 +02:00
Felix Geyer
d4a94a8996 Move attributes and attachments handking from Entry into own classes. 2012-04-14 15:38:20 +02:00
Felix Geyer
4334824e85 Emit modified() after all icon attributes have been set in Entry::setIcon(). 2012-04-11 22:05:24 +02:00
Florian Geyer
674909f635 Add modified signals for entries. 2012-04-11 21:50:20 +02:00
Florian Geyer
8b62365f8e Add modified signals for groups. 2012-04-11 21:50:20 +02:00
Florian Geyer
c80be1dd84 Add modified signals for metadata. 2012-04-11 21:50:20 +02:00
Florian Geyer
1d23ed46e5 Add modified signal for database. 2012-04-11 20:01:36 +02:00
Felix Geyer
08c8afc8f0 Add a Tools class with a humanReadableFileSize() method. 2012-04-09 23:53:46 +02:00
Felix Geyer
9aaec3499d Add signals for attribute and attachment changes. 2012-04-09 23:52:06 +02:00
Felix Geyer
57a953476a Use QMap to store attributes and attachments.
QMap keeps the keys in a consistent order (sorted).
2012-04-09 22:20:11 +02:00
Felix Geyer
d527e63f1f Change the Entry attributes/attachment API to provide a stable key order. 2012-04-06 19:33:29 +02:00
Felix Geyer
a8a6439ba0 Fix typo. 2012-01-07 17:18:48 +01:00