Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Deprecate QgsProject::title( QString )
  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 33d46d3 commit 1465e9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -165,7 +165,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString& offlineDataPath,
projectTitle = QFileInfo( QgsProject::instance()->fileName() ).fileName();
}
projectTitle += " (offline)";
QgsProject::instance()->title( projectTitle );
QgsProject::instance()->setTitle( projectTitle );

QgsProject::instance()->writeEntry( PROJECT_ENTRY_SCOPE_OFFLINE, PROJECT_ENTRY_KEY_OFFLINE_DB_PATH, dbPath );

Expand Down Expand Up @@ -295,7 +295,7 @@ void QgsOfflineEditing::synchronize()
// disable offline project
QString projectTitle = QgsProject::instance()->title();
projectTitle.remove( QRegExp( " \\(offline\\)$" ) );
QgsProject::instance()->title( projectTitle );
QgsProject::instance()->setTitle( projectTitle );
QgsProject::instance()->removeEntry( PROJECT_ENTRY_SCOPE_OFFLINE, PROJECT_ENTRY_KEY_OFFLINE_DB_PATH );
remoteLayer->reload(); //update with other changes
}
Expand Down
7 changes: 1 addition & 6 deletions src/core/qgsproject.cpp
Expand Up @@ -358,16 +358,11 @@ QgsProject *QgsProject::instance()
return theProject_;
} // QgsProject *instance()

void QgsProject::title( QString const &title )
void QgsProject::setTitle( const QString &title )
{
imp_->title = title;

dirty( true );
} // void QgsProject::title

void QgsProject::setTitle( const QString &t )
{
title( t );
}


Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsproject.h
Expand Up @@ -82,10 +82,10 @@ class CORE_EXPORT QgsProject : public QObject
/**
Every project has an associated title string
### QGIS 3: remove in favor of setTitle(...)
@deprecated Use @link setTitle @endlink instead.
*/
//@{
void title( const QString & title );
Q_DECL_DEPRECATED inline void title( const QString & title ) { setTitle( title ); }

/** Set project title
* @note added in 2.4 */
Expand Down

0 comments on commit 1465e9b

Please sign in to comment.