File indexing completed on 2025-01-26 05:00:55
0001 /* 0002 * SPDX-FileCopyrightText: 2011, 2012 Ivan Cukic <ivan.cukic(at)kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 // Qt 0010 #include <QDateTime> 0011 #include <QSqlError> 0012 #include <QString> 0013 0014 // Utils 0015 #include <utils/d_ptr.h> 0016 0017 // Local 0018 #include <common/database/Database.h> 0019 0020 namespace Common 0021 { 0022 class Database; 0023 } // namespace Common 0024 0025 class ResourcesDatabaseInitializer 0026 { 0027 public: 0028 // static Database *self(); 0029 0030 private: 0031 ResourcesDatabaseInitializer(); 0032 ~ResourcesDatabaseInitializer(); 0033 0034 void initDatabase(bool retryOnFail = true); 0035 0036 D_PTR; 0037 0038 friend Common::Database::Ptr resourcesDatabase(); 0039 }; 0040 0041 Common::Database::Ptr resourcesDatabase();