| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Helper::picSize assumed that all data passed to it is a valid image and
thus crashed with an exception. Wrap it into try - catch and return
QVariant() when the pic is invalid.
|
|
|
|
|
|
|
|
|
| |
This is a huge commit. Changes:
* Obviously, make it compile
* Make it run (only scarcely tested)
* get rid of most of clang's warnings
Let's see what surprises are in store...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix focus policy: only change focus between MappingTreeWidget and
MappingTreeResultView.
Also, block updating the selection of MappingTreeWidget when removing an
item from the result view. That operation resets the result selection
and by signal changes the selection of the mapping tree. The easiest way
I could come up with was a member flag that is set in removeMapping and
checked and cleared in resultSelectionChanged. Clearing the flag right
after removing the item doesn't work, most likely because of thread
affinity (just a guess, didn't check it). If it has side effects remains to
be seen...
|
|
|
|
| |
Use type-safe connect syntax and weed out foreach.
|
|
|
|
|
| |
Create separate files for MappingData and MappingTreeResultModel.
Hopefully no functional changes.
|
|
|
|
|
| |
Split up all the classes in mappingtreewidget into separate files to
make editing easier.
|
|
|
|
| |
Single it out to a separate file to make editing easier.
|
|
|
|
| |
And remove a lot of cruft... Still much work to be done :(
|
|
|
|
|
| |
Add option and use it. Warn if the directory is not accessible and bail
out. Initialize mFilesCtr to 0 so we don't crash if it's < 0
|
|
|
|
| |
Also fix handling of next picture.
|
|
|
|
|
|
| |
Make archiving various pictures easier. When NewPicsDialog is calles
with a directory, the Next> button archives the current pic and selects
the next.
|
|
|
|
|
| |
Actually use valid. Return when we get something else than an image.
Otherwise we'd crash in ImageMagick::ping.
|
|
|
|
|
|
|
|
| |
and replace them with write/readSettings. It was a useless feature
anyway, don't even remember what it was good for.
Also fix another bug in MappingTreeResultModel: Clear mCurrentData too,
when clearData is called.
|
|
|
|
|
|
|
|
|
|
| |
* start maximized
* focus MappingTree when showing NewPicsDialog
* Keyboard Shortcuts for FilesystemWidget:
CTRL+UP: go to parent dir
CTRL+LEFT: go back
CTRL+U: unpack
* close UnpackDialog when done
|
| |
|
|
|
|
|
|
|
| |
* Position progress bar in the center of the dialog instead of
PictureViewer
* Set title for progress bar
* set appropriate windowTitle for NewPicsDialog
|
|
|
|
|
| |
* Make sure that we don't add pictures without mapping
* Let the windowmanager position the progress dialog
|
|
|
|
| |
A set of attributes can now be saved and loaded in NewPicsDialog.
|
|
|
|
|
| |
Add button to save the position of the NewPicsDialog and move it there
when we show()
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove debug statements from SmDirWatcher
* Don't crash on parentDir when current Dir is already deleted
* Fix PicFilesModel MappingQuery. It needlessly referenced the table
pics in FROM causing an expensive full table scan!
* Fix findRecursive in PicFilesModel: Stupid typo!
* Give SmDirWatcher a separate DB-Connection. One Thread, one Connection
* Remove several includes
This should have been 6 commits, but that's how debugging works :(
|
|
|
|
|
|
|
|
| |
Since that commit we not only recorded leaves for Mappings, but also the
nodes. This is plain wrong, since we build the path/tree ourselves where
it matters (e.g. MappingTreeItem).
Fix it by checking recursively if the MappingItem has children.
|
|
|
|
| |
Show ProgressDialog when checksumming and archiving pictures
|
|
|
|
|
|
| |
* Change fixed width front from "courier" to "Monospace"
* Remove foregroundcolor from SmTreeItem. Wasn't used nor needed, quite
the opposite: it made SheMov deviate from the default style.
|
|
|
|
|
|
|
|
|
|
| |
Move the pic to archive first. If the filename returned from
moveToArchive is different then the file already existed and was mangled
with the md5sum. Record the new filename in the db.
Theoretically, the same problem exists with archiving movies, but it's
very unlikely to happen (I hope). Also, it's way more difficult to
untangle.
|
|
|
|
|
|
| |
* Show and archive size of pictures
* Fix SqlQueries in PicFilesModel: removeFiles and changeMappings
* use delegate in PictureView
|
|
|
|
|
|
|
| |
* repair shortcuts for adding files to NewPicsDialog and showing it from
PictureViewer2
* Replace files in NewPicsDialog instead of adding them
* add missing header to MappingTreeModel
|
|
|
|
|
|
|
| |
* remove some of the Transaction madness
* make it possible to archive pics again
It's far from finished....
|
|
|
|
|
|
|
| |
This reverts commit 06cfadc8386aec27b9c7c43486fc0b057e9fb022.
Turns out that this was not the root cause for the crashes.
Still stumped.
|
|
|
|
|
|
|
| |
This stuff was racy from the beginning. It could happen that the model
got reset after we fetched the selected indexes. Add a mutex and lock it
before operating on the file view. Hopefully this will many, if not all
random crashes.
|
|
|
|
|
|
|
|
|
|
| |
Don't try to delete all the prepared statements manually. Get rid of the
~destructors and just close the QSqlDatabase. close() deletes all
Statements.
Also, quit() all QThreads on closeEvent() except CompleterProducer. When
the experimental archive view gets merged, that QThread is gone. No need
to bother...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Well, what started as a try to simplify QTreeView ended in a mass header
murder...
What happened:
* I searched for a way to let every QTreeView honor the
setAlternatingRowcolors() setting. Unfortunately it isn't enough to just
set the global palette and set it to true. So every QTreeView is now
derived from SmTreeView
* SmTreeView registers itself with SmGlobals, so the property is set
_after_ it's constructed. It's definitely not enough to call it in the
constructor. I guess that's a bug. But it's enough to append the
SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the
painting is done.
* As an added Bonus we can add virt. funcs to every SmTreeView at will
While at it I realized that most of the included headers were void, so
remove them. No idea what impact it has on the bin size...
|
|
|
|
|
|
|
| |
This is more a qt5-fix than a SmDirModel fix. The global palette doesn't
propagate any more, so we have to set the palette in every QTreeView
separately. Very annoying and tedious. Maybe I missed a Widget or two,
dunno...
|
|
|
|
|
|
|
|
| |
* Change #include to qt5
* Fix missing QX11Info
* use explicit constructor for QVariant(QColor)
* use beginResetModel() and endResetModel() instead of reset(). The
latter was removed. Hopefully it still works :)
|
|
|
|
|
| |
Forgot to fix/rename MappingTreeResultModel... Adding pictures works
again :)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename:
* drop table pics_mappings
* rename pics_mappings2 to pics_mappings (no column renames)
Cleanup:
* drop tables and sequences: pics_attributes*
* drop tables and sequences: pics_actors*
* drop tables and sequences: pics_themes*
Still works!
|
|
|
|
|
|
|
|
|
|
|
| |
To make archiving pictures from different sources easier, add a
NewPicsDialog to PictureViewer. Add shortcuts to show the dialog and
adding pics to it. After adding all pics with the same mappping, just
click OK and add them to the archive.
Shortcuts:
Meta+s: Show NewPicsDialog
Meta+a: Add current pic
|
|
|
|
|
|
|
| |
Only select files when archiving pics from filemanager. While at it, I
noticed a crash on close when no item is selected in PicturesWidget. So
check if MappingData is valid on writing settings. Best way is
MappingData::isValid(), and for that I needed a explicit constructor.
|
|
|
|
|
|
| |
Well, what can I say. Lost in recursion and parent pointers. This commit
actually boils down to using the proper database tables and inserting
the right values. 'Nuff said...
|
|
|
|
|
| |
Added convenience function to archive selected pictures. Selected pics
in the FileManager will automagically be added to NewPicsDialog.
|
|
|
|
| |
Write last opened dir from QFileDialog in NewPicsDialog.
|
|
|
|
|
| |
Put mapping editor into a seperate class to make it easier using it for
changing mappings later.
|
|
|
|
|
|
| |
Finally NewPicsDialog actually does something. Added another parameter
to Helper::moveToArchive. If set to true, files will only be copied
instead of moved. Default is false, not changing the expected behavior.
|
|
|
|
|
|
|
| |
Make it possible to add mappings to new pictures. This actually was a
tough one. Maybe I shouldn't drink and code.
Next: make NewPicsDialog actually do something.
|
|
Version 1 of NewPicsDialog. Just one single tab for adding files. Does
nothing yet besides adding and removing files.
|