summaryrefslogtreecommitdiffstats
path: root/smdirmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't clean up after ourselvesArno2013-06-011-5/+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?
* Possible Bugfix for SmDirModelArno2013-04-111-0/+3
| | | | | | | Check for valid QModelIndex in dirEvent. It could very well be possible that we get an invalid index from find(), especially when deleting or modifying files. Maybe this fixes some unexplained crashes I wasn't able to reproduce...
* SmDirModel: check if file already is in databaseArno2013-04-061-0/+14
| | | | | 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-16/+12
| | | | | 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-19/+0
| | | | It's a leftover. Data is collected by SmDataCollector.
* Show pic size in SmDirModelArno2013-04-061-1/+16
| | | | | | If file is an image, grab the size and add it to the model. Also, remove some leftover debug statements from SmTreeView.
* Show duration in statusBarArno2013-03-221-0/+10
| | | | | Show total duration of selected Movies in FileView. Created a new class Helper::Duration for this and declared it as QMetaType.
* Implement auto refreshArno2013-03-211-0/+12
| | | | | Since inotify isn't completely implemented for cifs mounts, implement auto refresh for FileView. Default is 5 seconds.
* Final inotify!Arno2013-03-211-17/+34
| | | | | | | | | | | | | | | | | | | | 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-20/+12
| | | | | | 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 :)
* Icons for SmDirModelArno2013-03-171-0/+33
| | | | | Made Icons for SmDirModel configurable. For now it's folders, movies, pictures and others.
* Make SmDirModel/SmDirWatcher do somethingArno2013-03-171-2/+27
| | | | I think I got it working! It does what I want it to do :)
* First shot at SmDirModelArno2013-03-161-0/+127
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...