Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Apr 7, 2018
1 parent 17a8c45 commit 663a9ac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion python/core/qgsprojectstorageregistry.sip.in
Expand Up @@ -23,7 +23,6 @@ This is a singleton that should be accessed through :py:func:`QgsApplication.pro
#include "qgsprojectstorageregistry.h"
%End
public:
QgsProjectStorageRegistry();
~QgsProjectStorageRegistry();

QgsProjectStorage *projectStorageFromType( const QString &type );
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsproject.cpp
Expand Up @@ -483,6 +483,9 @@ QString QgsProject::absoluteFilePath() const
if ( storage )
return QString();

if ( mFile.fileName().isEmpty() )
return QString(); // this is to protect ourselves from getting current directory from QFileInfo::absoluteFilePath()

return QFileInfo( mFile.fileName() ).absoluteFilePath();
}

Expand Down
1 change: 0 additions & 1 deletion src/core/qgsprojectstorageregistry.h
Expand Up @@ -33,7 +33,6 @@ class QgsProjectStorage;
class CORE_EXPORT QgsProjectStorageRegistry
{
public:
QgsProjectStorageRegistry() = default;
~QgsProjectStorageRegistry();

//! Returns storage implementation if the storage type matches one. Returns null pointer otherwise (it is a normal file)
Expand Down
1 change: 0 additions & 1 deletion src/providers/postgres/qgspostgresprojectstorage.h
Expand Up @@ -23,7 +23,6 @@ typedef struct
class QgsPostgresProjectStorage : public QgsProjectStorage
{
public:
QgsPostgresProjectStorage() = default;

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

Expand Down

0 comments on commit 663a9ac

Please sign in to comment.