summaryrefslogtreecommitdiffstats
path: root/smdirmodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Good riddance Filesystem Widget!Arno2018-04-031-84/+0
| | | | | | Get rid of FilesystemWidget and helper classes. The SmDirWatcher was useful, once, I guess, nice to implement it by foot, but with the current workflow it isn't needed any more.
* Update free space when event occursArno2016-10-011-0/+1
| | | | | Update free space when we get an inotify event that changes disk space, or when refresh is called.
* Fix crash in deleteFilesArno2015-08-131-0/+9
| | | | | | This was a hard one. SmDirWatcher raced against the model. Stop and quit the watcher before actually deleting files. That can take a while if file operations are in progress, so show the busy cursor.
* Remove progress dialog and use Qt::WaitCursor insteadArno2015-08-051-2/+0
| | | | | | | | | Get rid of the progress Dialog in the filesystem widget and replace it with Qt::WaitCursor. While at it, show the waitcursor in the picture widget, too. Also remove the annoying warnings from ImageMagick by defining the missing constants.
* Don't show progressdialog when autorefreshingArno2014-12-101-0/+2
| | | | | | They don't play nice together. Crap... AutoRefresh should be a thread, but that opens another shebang of problems, I guess. So don't show the dialog for now.
* Various Bugfixes and cleanupsArno2014-12-101-2/+0
| | | | | | | | | | | | * 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 :(
* Major revamp of the file ManagerArno2014-12-071-3/+1
| | | | | | Nothing is async any more. Didn't work, anyway. Instead show a QProgressDialog when gathering data. Was kinda surprising that processEvents has to be called explicitly... Well, done!
* Introduce Expensive OperationsArno2013-09-031-0/+2
| | | | | | | Add a configuration Option to (de-)select expensive file operations. That would be md5Summing and gathering the Bitrate/Duration. That should help the performance on networked directories...
* Switch to QRunnable + QThreadPoolArno2013-09-031-6/+6
| | | | | | | | | | | Get rid of SmDataCollector and do its job in small, QRunnable tasks and let QThreadPool manage the treads. Works well with a local Filesystem. Yet to see how it works over networked Filesystems. Ah, before I forget: NEVER, EVER USE QPixmap in THREADS -> Random crashes! (Yes, I know, it's documented...)
* Revert "Don't show progress dialog when we're polling"Arno2013-08-301-1/+0
| | | | | This reverts commit 2cc92200386c55818cbe9bcb7d2e488170317d70. Wrong, non-working solution for this problem.
* Don't show progress dialog when we're pollingArno2013-08-281-0/+1
|
* Add a progress dialog to FilesystemWidget1.2.0Arno2013-08-281-0/+3
| | | | Show a progress dialog when gathering data from the filesystem.
* Another shot at the Filesystem View crashesArno2013-07-291-0/+9
| | | | | | | I think I found the bug. We need to stop the refresh timer when operating on the view, because it can reset the model while we're still holding QModelIndexes. When that happens we're working with invalid indexes and BOOM.
* Revert "Prevent datacollector from running when operating on files"Arno2013-07-291-1/+0
| | | | | | | This reverts commit 06cfadc8386aec27b9c7c43486fc0b057e9fb022. Turns out that this was not the root cause for the crashes. Still stumped.
* Prevent datacollector from running when operating on filesArno2013-07-291-0/+1
| | | | | | | 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.
* Cleanup closeEventArno2013-07-271-0/+1
| | | | | | | | | | 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...
* Don't clean up after ourselvesArno2013-06-011-1/+0
| | | | | Don't delete threads and stuff in destructors. It leads to SIGARBRT when debugging. Now we get a warning on close, but who cares?
* SmDirModel: check if file already is in databaseArno2013-04-061-3/+4
| | | | | Indicate if we already have a file by coloring the filename darkGreen when browsing the filesystem.
* Put duration and size in one Field (SmDirModel)Arno2013-04-061-3/+3
| | | | | Consolidate duration and size in one Field, like in the archive, to be consistent. Also rename the Role and Field accordingly.
* Remove function fileData from SmDirModelArno2013-04-061-1/+0
| | | | It's a leftover. Data is collected by SmDataCollector.
* Show pic size in SmDirModelArno2013-04-061-3/+3
| | | | | | If file is an image, grab the size and add it to the model. Also, remove some leftover debug statements from SmTreeView.
* Remember selections on FileModel resetArno2013-03-221-1/+1
| | | | | | Since can reset the FileView through a time, remember the selections on reset and restore them after. The Timer is stopped when an item is being edited.
* Implement auto refreshArno2013-03-211-0/+1
| | | | | Since inotify isn't completely implemented for cifs mounts, implement auto refresh for FileView. Default is 5 seconds.
* Final inotify!Arno2013-03-211-10/+6
| | | | | | | | | | | | | | | | | | | | A huge commit, I know, but it was definitely worth it! It makes the homebrew FilesystemModel work! It's divided up into two threads: 1. The Watcher: it reacts on inotify events and dispatches them to: 2. The Collector: this thread gathers the data and emits the SIGNALS to the the view. Now we can actually refresh the View, not possible with QFileSystemModel, and the data reloads in almost real time without blocking the GUI. Unfortunately this uncovered some bugs I had to fix: 1. Helper::md5sum: Don't crash if read fails with -1 2. SmTreeModel::addRow is broken. Even after 5h I couldn't figure out how or why, so I brute forced it. Reset the moded when a file is added. 3. Get rid of a lot of unneeded #include's I guess that's about it...
* Use a Thread for collecting file dataArno2013-03-201-2/+7
| | | | | | blocking the GUI isn't nice, so use a separate Thread to gather all the data for SmDirModel. Populating and changing directory works, but modifying a file is most likely broken.
* Auto resize FileViewArno2013-03-201-0/+3
| | | | | Automatically resize FileView when it changes. I guess I was quite drunk on the first try. Fortunately I didn't commit it :)
* Fix create FolderArno2013-03-171-0/+2
| | | | Don't let createFolder crash b/c of wrong model.
* Icons for SmDirModelArno2013-03-171-0/+5
| | | | | Made Icons for SmDirModel configurable. For now it's folders, movies, pictures and others.
* Make SmDirModel/SmDirWatcher do somethingArno2013-03-171-3/+7
| | | | I think I got it working! It does what I want it to do :)
* First shot at SmDirModelArno2013-03-161-0/+48
Gotta take a break here. Hopefully this will end up in a custom QFilesystemModel, but I'm hitting so many bugs on the way. Some things haven't worked for ages, I guess. Anyway, the watcher doesn't do anythying right now, still fixing bugs...