Baloo

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

KDE's Doxygen guidelines are available online.