Skip to content
Permalink
Browse files

Deprecate QgsProject::title( QString )

  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 33d46d3 commit 1465e9b3bdcc62ea2e538431ba96b155c604cac4
Showing with 5 additions and 10 deletions.
  1. +2 −2 src/core/qgsofflineediting.cpp
  2. +1 −6 src/core/qgsproject.cpp
  3. +2 −2 src/core/qgsproject.h
@@ -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 );

@@ -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
}
@@ -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 );
}


@@ -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 */

0 comments on commit 1465e9b

Please sign in to comment.
You can’t perform that action at this time.