be single

This commit is contained in:
likehomedream 2024-01-02 16:58:14 +08:00
parent d77b11187e
commit e72401bf11
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,12 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
initUkuiLog4qt("kylin-theme-builder");
static QSharedMemory *singleApp = new QSharedMemory("kylin-theme-builder");
if(!singleApp->create(1))//创建失败
{
qApp->quit();
return -1;
}
//翻译
QTranslator app_trans;
QString locale = QLocale::system().name();