Skip to content

Commit 663a9ac

Browse files
committedApr 7, 2018
Test fixes
1 parent 17a8c45 commit 663a9ac

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed
 

‎python/core/qgsprojectstorageregistry.sip.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ This is a singleton that should be accessed through :py:func:`QgsApplication.pro
2323
#include "qgsprojectstorageregistry.h"
2424
%End
2525
public:
26-
QgsProjectStorageRegistry();
2726
~QgsProjectStorageRegistry();
2827

2928
QgsProjectStorage *projectStorageFromType( const QString &type );

‎src/core/qgsproject.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ QString QgsProject::absoluteFilePath() const
483483
if ( storage )
484484
return QString();
485485

486+
if ( mFile.fileName().isEmpty() )
487+
return QString(); // this is to protect ourselves from getting current directory from QFileInfo::absoluteFilePath()
488+
486489
return QFileInfo( mFile.fileName() ).absoluteFilePath();
487490
}
488491

‎src/core/qgsprojectstorageregistry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class QgsProjectStorage;
3333
class CORE_EXPORT QgsProjectStorageRegistry
3434
{
3535
public:
36-
QgsProjectStorageRegistry() = default;
3736
~QgsProjectStorageRegistry();
3837

3938
//! Returns storage implementation if the storage type matches one. Returns null pointer otherwise (it is a normal file)

‎src/providers/postgres/qgspostgresprojectstorage.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ typedef struct
2323
class QgsPostgresProjectStorage : public QgsProjectStorage
2424
{
2525
public:
26-
QgsPostgresProjectStorage() = default;
2726

2827
virtual QString type() override { return QStringLiteral( "postgresql" ); }
2928

0 commit comments

Comments
 (0)
Please sign in to comment.