Skip to content

Commit

Permalink
User standard capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 21, 2020
1 parent cbba10b commit cfba5cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsproject.sip.in
Expand Up @@ -97,7 +97,7 @@ Returns the user name that did the last save.
.. versionadded:: 3.12
%End

QString saveUserFullname() const;
QString saveUserFullName() const;
%Docstring
Returns the full user name that did the last save.

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproject.h
Expand Up @@ -176,7 +176,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
*
* \since QGIS 3.12
*/
QString saveUserFullname() const;
QString saveUserFullName() const;

/**
* Returns TRUE if the project has been modified since the last write()
Expand Down
8 changes: 4 additions & 4 deletions tests/src/core/testqgsproject.cpp
Expand Up @@ -491,7 +491,7 @@ void TestQgsProject::projectSaveUser()
{
QgsProject p;
QVERIFY( p.saveUser().isEmpty() );
QVERIFY( p.saveUserFullname().isEmpty() );
QVERIFY( p.saveUserFullName().isEmpty() );

QTemporaryFile f;
QVERIFY( f.open() );
Expand All @@ -500,21 +500,21 @@ void TestQgsProject::projectSaveUser()
p.write();

QCOMPARE( p.saveUser(), QgsApplication::userLoginName() );
QCOMPARE( p.saveUserFullname(), QgsApplication::userFullName() );
QCOMPARE( p.saveUserFullName(), QgsApplication::userFullName() );

QgsSettings s;
s.setValue( QStringLiteral( "projects/anonymize_saved_projects" ), true, QgsSettings::Core );

p.write();

QVERIFY( p.saveUser().isEmpty() );
QVERIFY( p.saveUserFullname().isEmpty() );
QVERIFY( p.saveUserFullName().isEmpty() );

s.setValue( QStringLiteral( "projects/anonymize_saved_projects" ), false, QgsSettings::Core );

p.write();
QCOMPARE( p.saveUser(), QgsApplication::userLoginName() );
QCOMPARE( p.saveUserFullname(), QgsApplication::userFullName() );
QCOMPARE( p.saveUserFullName(), QgsApplication::userFullName() );
}

void TestQgsProject::testSetGetCrs()
Expand Down

0 comments on commit cfba5cf

Please sign in to comment.