Baloo

global.cpp
1 /*
2  This file is part of the KDE Baloo Project
3  SPDX-FileCopyrightText: 2015 Ashish Bansal <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #include "global.h"
9 
10 #include <QStandardPaths>
11 using namespace Baloo;
12 
13 Q_GLOBAL_STATIC_WITH_ARGS(Database, s_db, (fileIndexDbPath()))
14 
15 QString Baloo::fileIndexDbPath()
16 {
17  QString envBalooPath = QString::fromLocal8Bit(qgetenv("BALOO_DB_PATH"));
18  if (!envBalooPath.isEmpty()) {
19  return envBalooPath;
20  }
21 
23  return path;
24 }
25 
26 Database* Baloo::globalDatabaseInstance()
27 {
28  return s_db;
29 }
QString writableLocation(QStandardPaths::StandardLocation type)
QString fromLocal8Bit(const char *str, int size)
Implements storage for docIds without any associated data Instantiated for:
Definition: coding.cpp:11
bool isEmpty() const const
QString path(const QString &relativePath)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:53:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.