Skip to content

Commit 9ceb6c6

Browse files
authored
Merge pull request #4109 from nyalldawson/db
Rename "Db"/"DB" in API to "Database"
2 parents 4cba478 + d47d31d commit 9ceb6c6

63 files changed

Lines changed: 350 additions & 295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/api_break.dox

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
8383
<tr><td>QgsCptCityColorRampV2DialogBase<td>QgsCptCityColorRampDialogBase
8484
<tr><td>QgsCurvePolygonV2<td>QgsCurvePolygon
8585
<tr><td>QgsCurveV2<td>QgsCurve
86+
<tr><td>QgsDbFilterProxyModel<td>QgsDatabaseFilterProxyModel
8687
<tr><td>QgsDiagramRendererV2<td>QgsDiagramRenderer
8788
<tr><td>QgsEditorWidgetV2<td>QgsEditorWidget
8889
<tr><td>QgsEllipseSymbolLayerV2<td>QgsEllipseSymbolLayer
@@ -399,6 +400,17 @@ QgsAdvancedDigitizingDockWidget {#qgis_api_break_3_0_QgsAdvancedDigitizin
399400
- canvasReleaseEvent takes now QgsAdvancedDigitizingDockWidget::CaptureMode as second argument.
400401

401402

403+
QgsApplication {#qgis_api_break_3_0_QgsApplication}
404+
--------------
405+
406+
- qgisMasterDbFilePath() was renamed to qgisMasterDatabaseFilePath()
407+
- qgisMasterDatabaseFilePath() was renamed to qgisUserDatabaseFilePath()
408+
- qgisAuthDbFilePath() was renamed to qgisAuthDatabaseFilePath()
409+
- srsDbFilePath() was renamed to srsDatabaseFilePath()
410+
- setAuthDbDirPath() was renamed to setAuthDatabaseDirPath()
411+
- createDB() was renamed to createDatabase()
412+
413+
402414
QgsAtlasComposition {#qgis_api_break_3_0_QgsAtlasComposition}
403415
-------------------
404416

@@ -437,6 +449,19 @@ QgsAuthConfigUriEdit {#qgis_api_break_3_0_QgsAuthConfigUriEdit}
437449
- hasConfigID() has been renamed to hasConfigId()
438450

439451

452+
QgsAuthManager {#qgis_api_break_3_0_QgsAuthManager}
453+
--------------
454+
455+
- authDbConnection() was renamed to authDatabaseConnection()
456+
- authDbConfigTable() was renamed to authDatabaseConfigTable()
457+
- authDbServersTable() was renamed to authDatabaseServersTable()
458+
- authenticationDbPath() was renamed to authenticationDatabasePath()
459+
- masterPasswordHashInDb() was renamed to masterPasswordHashInDatabase()
460+
- scheduledAuthDbErase() was renamed to scheduledAuthDatabaseErase()
461+
- setScheduledAuthDbErase() was renamed to setScheduledAuthDatabaseErase()
462+
- setScheduledAuthDbEraseRequestEmitted() was renamed to setScheduledAuthDatabaseEraseRequestEmitted()
463+
464+
440465
QgsAuthMethod {#qgis_api_break_3_0_QgsAuthMethod}
441466
-------------
442467

@@ -699,6 +724,7 @@ called if changes are made to the CRS database.
699724
- geographicCRSAuthId() has been renamed to geographicCrsAuthId()
700725
- geographicFlag() was renamed to isGeographic()
701726
- axisInverted() was renamed to hasAxisInverted()
727+
- syncDb() was renamed to syncDatabase()
702728

703729

704730
QgsCoordinateTransform {#qgis_api_break_3_0_QgsCoordinateTransform}
@@ -1316,6 +1342,8 @@ screenUpdateRequested() were removed. These members have had no effect for a num
13161342
- writeLayerXML() was renamed to writeLayerXml()
13171343
- capitaliseLayerName() was renamed to capitalizeLayerName() <!--#spellok-->
13181344
- asLayerDefinition(), fromLayerDefinition(), fromLayerDefinitionFile() were moved to QgsLayerDefinition class and renamed to exportLayerDefinitionLayers() resp. loadLayerDefinitionLayers()
1345+
- loadNamedStyleFromDb() was renamed to loadNamedStyleFromDatabase()
1346+
13191347

13201348

13211349
QgsMapLayerRegistry {#qgis_api_break_3_0_QgsMapLayerRegistry}
@@ -1430,6 +1458,13 @@ QgsOSMElement {#qgis_api_break_3_0_QgsOSMElement}
14301458
- elemID() has been renamed to elemId()
14311459

14321460

1461+
QgsOSMXmlImport {#qgis_api_break_3_0_QgsOSMXmlImport}
1462+
-------------
1463+
1464+
- setOutputDbFileName() and outputDbFileName() have been renamed to setOutputDatabaseFileName()
1465+
and outputDatabaseFileName()
1466+
1467+
14331468
QgsOwsConnection {#qgis_api_break_3_0_QgsOwsConnection}
14341469
----------------
14351470

@@ -1906,6 +1941,7 @@ capabilities have been removed, as they were unused and had no effect.
19061941
clause fragment which must be evaluated by the provider in order to calculate the default value. In
19071942
QGIS 3.0 defaultValue() only returns literal, constant defaultValues. A new method defaultValueClause
19081943
has been added which returns the SQL clause fragments which must be evaluated by the provider itself.
1944+
- isSaveAndLoadStyleToDBSupported() was renamed to isSaveAndLoadStyleToDatabaseSupported()
19091945

19101946

19111947
QgsVectorJoinInfo {#qgis_api_break_3_0_QgsVectorJoinInfo}

python/analysis/openstreetmap/qgsosmimport.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class QgsOSMXmlImport : public QObject
1919
void setInputXmlFileName( const QString& xmlFileName );
2020
QString inputXmlFileName() const;
2121

22-
void setOutputDbFileName( const QString& dbFileName );
23-
QString outputDbFileName() const;
22+
void setOutputDatabaseFileName( const QString& fileName );
23+
QString outputDatabaseFileName() const;
2424

2525
/**
2626
* Run import. This will parse the XML file and store the data in a SQLite database.

python/core/auth/qgsauthmanager.sip

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class QgsAuthManager : QObject
2727
~QgsAuthManager();
2828

2929
/** Set up the application instance of the authentication database connection */
30-
QSqlDatabase authDbConnection() const;
30+
QSqlDatabase authDatabaseConnection() const;
3131

3232
/** Name of the authentication database table that stores configs */
33-
const QString authDbConfigTable() const;
33+
const QString authDatabaseConfigTable() const;
3434

3535
/** Name of the authentication database table that stores server exceptions/configs */
36-
const QString authDbServersTable() const;
36+
const QString authDatabaseServersTable() const;
3737

3838
/** Initialize QCA, prioritize qca-ossl plugin and optionally set up the authentication database */
3939
bool init( const QString& pluginPath = QString::null );
@@ -45,9 +45,9 @@ class QgsAuthManager : QObject
4545
const QString disabledMessage() const;
4646

4747
/** The standard authentication database file in ~/.qgis3/ or defined location
48-
* @see QgsApplication::qgisAuthDbFilePath
48+
* @see QgsApplication::qgisAuthDatabaseFilePath
4949
*/
50-
const QString authenticationDbPath() const;
50+
const QString authenticationDatabasePath() const;
5151

5252
/** Main call to initially set or continually check master password is set
5353
* @note If it is not set, the user is asked for its input
@@ -72,7 +72,7 @@ class QgsAuthManager : QObject
7272
bool masterPasswordIsSet() const;
7373

7474
/** Verify a password hash existing in authentication database */
75-
bool masterPasswordHashInDb() const;
75+
bool masterPasswordHashInDatabase() const;
7676

7777
/** Clear supplied master password
7878
* @note This will not necessarily clear authenticated connections cached in network connection managers
@@ -95,7 +95,7 @@ class QgsAuthManager : QObject
9595

9696
/** Whether there is a scheduled opitonal erase of authentication database.
9797
*/
98-
bool scheduledAuthDbErase();
98+
bool scheduledAuthDatabaseErase();
9999

100100
/** Schedule an optional erase of authentication database, starting when mutex is lockable.
101101
* @note When an erase is scheduled, any attempt to set the master password,
@@ -107,7 +107,7 @@ class QgsAuthManager : QObject
107107
* through the given application, to prompt the erase operation (e.g. via a dialog);
108108
* if no access to user interaction occurs wihtin 90 seconds, it cancels the schedule.
109109
*/
110-
void setScheduledAuthDbErase( bool scheduleErase );
110+
void setScheduledAuthDatabaseErase( bool scheduleErase );
111111

112112
/** Re-emit a signal to schedule an optional erase of authentication database.
113113
* @note This can be called from the slot connected to a previously emitted scheduling signal,
@@ -116,7 +116,7 @@ class QgsAuthManager : QObject
116116
* @param emitted Setting to false will cause signal to be emitted by the schedule timer.
117117
* Setting to true will stop any emitting, but will not stop the schedule timer.
118118
*/
119-
void setScheduledAuthDbEraseRequestEmitted( bool emitted );
119+
void setScheduledAuthDatabaseEraseRequestEmitted( bool emitted );
120120

121121
/** Simple text tag describing authentication system for message logs */
122122
QString authManTag() const;

python/core/qgsapplication.sip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
168168
static QString i18nPath();
169169

170170
//! Returns the path to the master qgis.db file.
171-
static QString qgisMasterDbFilePath();
171+
static QString qgisMasterDatabaseFilePath();
172172

173173
//! Returns the path to the settings directory in user's home dir
174174
static QString qgisSettingsDirPath();
175175

176176
//! Returns the path to the user qgis.db file.
177-
static QString qgisUserDbFilePath();
177+
static QString qgisUserDatabaseFilePath();
178178

179179
//! Returns the path to the user authentication database file: qgis-auth.db.
180-
static QString qgisAuthDbFilePath();
180+
static QString qgisAuthDatabaseFilePath();
181181

182182
//! Returns the path to the splash screen image directory.
183183
static QString splashPath();
@@ -186,7 +186,7 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
186186
static QString iconsPath();
187187

188188
//! Returns the path to the srs.db file.
189-
static QString srsDbFilePath();
189+
static QString srsDatabaseFilePath();
190190

191191
//! Returns the paths to svg directories.
192192
static QStringList svgPaths();
@@ -287,13 +287,13 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
287287
static void setDefaultSvgPaths( const QStringList& pathList );
288288

289289
//! Alters authentication data base directory path - used by 3rd party apps
290-
static void setAuthDbDirPath( const QString& theAuthDbDirPath );
290+
static void setAuthDatabaseDirPath( const QString& theAuthDbDirPath );
291291

292292
//! loads providers
293293
static void initQgis();
294294

295295
//! initialize qgis.db
296-
static bool createDB( QString* errorMessage = 0 );
296+
static bool createDatabase( QString* errorMessage = 0 );
297297

298298
//! Create the users theme folder
299299
static bool createThemeFolder();

python/core/qgscoordinatereferencesystem.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@
8787
* CRS Database and Custom CRS
8888
* ===========================
8989
*
90-
* The database of CRS shipped with QGIS is stored in a SQLite database (see QgsApplication::srsDbFilePath())
90+
* The database of CRS shipped with QGIS is stored in a SQLite database (see QgsApplication::srsDatabaseFilePath())
9191
* and it is based on the data files maintained by GDAL project (a variety of .csv and .wkt files).
9292
*
9393
* Sometimes it happens that users need to use a CRS definition that is not well known
9494
* or that has been only created with a specific purpose (and thus its definition is not
9595
* available in our database of CRS). Whenever a new CRS definition is seen, it will
96-
* be added to the local databse (in user's home directory, see QgsApplication::qgisUserDbFilePath()).
96+
* be added to the local databse (in user's home directory, see QgsApplication::qgisUserDatabaseFilePath()).
9797
* QGIS also features a GUI for management of local custom CRS definitions.
9898
*
9999
* There are therefore two databases: one for shipped CRS definitions and one for custom CRS definitions.
@@ -496,7 +496,7 @@ class QgsCoordinateReferenceSystem
496496
* negative number of failed updates in case of errors.
497497
* @note This is used internally and should not be necessary to call in client code
498498
*/
499-
static int syncDb();
499+
static int syncDatabase();
500500

501501

502502
/** Save the proj4-string as a custom CRS

python/core/qgsdbfilterproxymodel.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
class QgsDbFilterProxyModel: QSortFilterProxyModel
1+
class QgsDatabaseFilterProxyModel: QSortFilterProxyModel
22
{
33
%TypeHeaderCode
44
#include <qgsdbfilterproxymodel.h>
55
%End
66
public:
7-
QgsDbFilterProxyModel( QObject* parent /TransferThis/ = 0 );
8-
~QgsDbFilterProxyModel();
7+
QgsDatabaseFilterProxyModel( QObject* parent /TransferThis/ = 0 );
8+
~QgsDatabaseFilterProxyModel();
99
/** Calls QSortFilterProxyModel::setFilterWildcard and triggers update*/
1010
void _setFilterWildcard( const QString& pattern );
1111
/** Calls QSortFilterProxyModel::setFilterRegExp and triggers update*/

python/core/qgsmaplayer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class QgsMapLayer : QObject
425425
* @param qml will be set to QML style content from database
426426
* @returns true if style was successfully loaded
427427
*/
428-
virtual bool loadNamedStyleFromDb( const QString &db, const QString &uri, QString &qml /Out/ );
428+
virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml /Out/ );
429429

430430
/**
431431
* Import the properties of this layer from a QDomDocument

python/core/qgsvectordataprovider.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,15 @@ class QgsVectorDataProvider : QgsDataProvider
405405
* It returns false by default.
406406
* Must be implemented by providers that support saving and loading styles to db returning true
407407
*/
408-
virtual bool isSaveAndLoadStyleToDBSupported() const;
408+
virtual bool isSaveAndLoadStyleToDatabaseSupported() const;
409409

410410
/**
411411
* Checks if the provider supports style removal
412412
* Must be implemented by providers that support delete styles from db returning true
413413
* @note added in QGIS 3.0
414414
* @return true if delete operation is supported by the provider
415415
*/
416-
virtual bool isDeleteStyleFromDbSupported() const;
416+
virtual bool isDeleteStyleFromDatabaseSupported() const;
417417

418418
static QVariant convertValue( QVariant::Type type, const QString& value );
419419

python/core/symbology-ng/qgsstyle.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class QgsStyle : QObject
215215
* \note added in QGIS 3.0
216216
* \see createMemoryDb()
217217
*/
218-
bool createDb( const QString& filename );
218+
bool createDatabase( const QString& filename );
219219

220220
/** Creates a temporary memory database
221221
*
@@ -224,7 +224,7 @@ class QgsStyle : QObject
224224
* \note added in QGIS 3.0
225225
* \see createDb()
226226
*/
227-
bool createMemoryDb();
227+
bool createMemoryDatabase();
228228

229229
/** Creates tables structure for new database
230230
*
@@ -305,7 +305,7 @@ class QgsStyle : QObject
305305

306306
protected:
307307
//! Convenience function to open the DB and return a sqlite3 object
308-
bool openDB( const QString& filename );
308+
bool openDatabase( const QString& filename );
309309

310310
/** Convenience function that would run queries which don't generate return values
311311
* \param query query to run

src/analysis/openstreetmap/qgsosmimport.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,17 @@ class ANALYSIS_EXPORT QgsOSMXmlImport : public QObject
4242
void setInputXmlFileName( const QString& xmlFileName ) { mXmlFileName = xmlFileName; }
4343
QString inputXmlFileName() const { return mXmlFileName; }
4444

45-
void setOutputDbFileName( const QString& dbFileName ) { mDbFileName = dbFileName; }
46-
QString outputDbFileName() const { return mDbFileName; }
45+
/**
46+
* Sets the filename for the output database.
47+
* @see outputDatabaseFileName()
48+
*/
49+
void setOutputDatabaseFileName( const QString& fileName ) { mDbFileName = fileName; }
50+
51+
/**
52+
* Returns the filename for the output database.
53+
* @see setOutputDatabaseFileName()
54+
*/
55+
QString outputDatabaseFileName() const { return mDbFileName; }
4756

4857
/**
4958
* Run import. This will parse the XML file and store the data in a SQLite database.

0 commit comments

Comments
 (0)