ukui-search/libsearch/appdata/app-db-manager.h

28 lines
611 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef APPDBMANAGER_H
#define APPDBMANAGER_H
#include <QObject>
#include <QSqlDatabase>
namespace UkuiSearch {
/**
* @brief The AppDBManager class
* 功能1.遍历并且监听desktop文件目录建立并且维护应用信息数据库。
* 2.监听应用安装,打开事件,收藏等事件,更新数据库
*/
class AppDBManager : public QObject
{
Q_OBJECT
public:
static AppDBManager *getInstance();
void initDateBaseConnection();
private:
explicit AppDBManager(QObject *parent = nullptr);
~AppDBManager();
QSqlDatabase m_database;
};
}
#endif // APPDBMANAGER_H