aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets/DirWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-09-09 17:13:51 -0400
committerKen Moore <moorekou@gmail.com>2015-09-09 17:13:51 -0400
commit904b5133a5887bd715969c87a4b90d9bad896c54 (patch)
tree1d1349c2fe82ce7f155698722ba2d1525d4f834c /lumina-fm/widgets/DirWidget.cpp
parentUpdate the dependencies/project to include the Qt5-Concurrent build module (n... (diff)
parentSolves issue 11233 (diff)
downloadlumina-904b5133a5887bd715969c87a4b90d9bad896c54.tar.gz
lumina-904b5133a5887bd715969c87a4b90d9bad896c54.tar.bz2
lumina-904b5133a5887bd715969c87a4b90d9bad896c54.zip
Merge pull request #154 from harcobbit/issue/11233
Solves issue 11233
Diffstat (limited to 'lumina-fm/widgets/DirWidget.cpp')
-rw-r--r--lumina-fm/widgets/DirWidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index ed1f4544..22879c1b 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -111,7 +111,7 @@ void DirWidget::setShowThumbnails(bool show){
void DirWidget::setDetails(QList<DETAILTYPES> list){
listDetails = list;
//Need to re-create the header item as well
- QTreeWidgetItem *it = new QTreeWidgetItem();
+ CQTreeWidgetItem *it = new CQTreeWidgetItem();
int nmcol = -1; int typecol = -1;
for(int t=0; t<listDetails.length(); t++){
switch(listDetails[t]){
@@ -283,15 +283,16 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){
watcher->addPath(list[i].absoluteFilePath());
if(showDetails){
//Now create all the individual items for the details tree
- QTreeWidgetItem *it;
+ CQTreeWidgetItem *it;
bool addnew = false;
//See if an item already exists for this file
QList<QTreeWidgetItem*> items = treeWidget->findItems(list[i].fileName(),Qt::MatchExactly,0); //NOTE: This requires column 0 to be the name
if(items.isEmpty()){
- it = new QTreeWidgetItem();
+ it = new CQTreeWidgetItem();
addnew = true;
}else{
- it = items.first();
+ // Safe downcasting because CQTreeWidgetItem only redefines the virtual function bool opearot<. Not new methos added.
+ it = static_cast<CQTreeWidgetItem *> (items.first());
}
//Now update the entry contents
it->setWhatsThis(0, QString(canmodify ? "cut": "copy")+"::::"+list[i].absoluteFilePath());
bgstack15