Skip to content

Commit ba4948e

Browse files
committedJan 16, 2015
use directory path and not item path (fixes #11871)
1 parent d11cc82 commit ba4948e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎src/core/qgsbrowsermodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include <QSettings>
3131

32-
QgsBrowserWatcher::QgsBrowserWatcher( QgsDataItem * item )
32+
QgsBrowserWatcher::QgsBrowserWatcher( QgsDataItem *item )
3333
: mItem( item )
3434
{
3535
}

‎src/core/qgsdataitem.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ QVector<QgsDataItem*> QgsDirectoryItem::createChildren()
768768
QString subdirPath = dir.absoluteFilePath( subdir );
769769
QgsDebugMsgLevel( QString( "creating subdir: %1" ).arg( subdirPath ), 2 );
770770

771-
QString path = mPath + "/" + subdir; // may differ from subdirPath
771+
QString path = mDirPath + "/" + subdir; // may differ from subdirPath
Code has comments. Press enter to view.
772772
QgsDirectoryItem *item = new QgsDirectoryItem( this, subdir, subdirPath, path );
773773
// propagate signals up to top
774774

@@ -1443,7 +1443,7 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, QString dirPath, QSt
14431443
return 0;
14441444
}
14451445

1446-
const QStringList & QgsZipItem::getZipFileList()
1446+
const QStringList &QgsZipItem::getZipFileList()
14471447
{
14481448
if ( ! mZipFileList.isEmpty() )
14491449
return mZipFileList;
@@ -1452,7 +1452,7 @@ const QStringList & QgsZipItem::getZipFileList()
14521452
QSettings settings;
14531453
QString scanZipSetting = settings.value( "/qgis/scanZipInBrowser2", "basic" ).toString();
14541454

1455-
QgsDebugMsgLevel( QString( "mFIlePath = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( mFilePath ).arg( name() ).arg( scanZipSetting ).arg( mVsiPrefix ), 3 );
1455+
QgsDebugMsgLevel( QString( "mFilePath = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( mFilePath ).arg( name() ).arg( scanZipSetting ).arg( mVsiPrefix ), 3 );
14561456

14571457
// if scanZipBrowser == no: skip to the next file
14581458
if ( scanZipSetting == "no" )
@@ -1461,7 +1461,7 @@ const QStringList & QgsZipItem::getZipFileList()
14611461
}
14621462

14631463
// get list of files inside zip file
1464-
QgsDebugMsgLevel( QString( "Open file %1 with gdal vsi" ).arg( mVsiPrefix + path() ), 3 );
1464+
QgsDebugMsgLevel( QString( "Open file %1 with gdal vsi" ).arg( mVsiPrefix + mFilePath ), 3 );
14651465
char **papszSiblingFiles = VSIReadDirRecursive1( QString( mVsiPrefix + mFilePath ).toLocal8Bit().constData() );
14661466
if ( papszSiblingFiles )
14671467
{

‎src/core/qgsdataitem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem
431431

432432
public:
433433
QgsZipItem( QgsDataItem* parent, QString name, QString path );
434-
QgsZipItem( QgsDataItem* parent, QString name, QString dirPath, QString path );
434+
QgsZipItem( QgsDataItem* parent, QString name, QString filePath, QString path );
435435
~QgsZipItem();
436436

437437
QVector<QgsDataItem*> createChildren() override;

0 commit comments

Comments
 (0)
Please sign in to comment.