diff --git a/data/org.ukui.control-center.gschema.xml b/data/org.ukui.control-center.gschema.xml index 85c4ef7..58a60ab 100644 --- a/data/org.ukui.control-center.gschema.xml +++ b/data/org.ukui.control-center.gschema.xml @@ -6,9 +6,30 @@ Control panel default font list - ['kylin-weather.desktop', 'sogouImeService.desktop'] + ['kylin-weather.desktop', 'sogouImeService.desktop'] Control panel autoapp list Control panel autoapp list + + false + Whether open + + This key is used to record whether to open service. + + + + false + Whether vino service activice + + This key is used to record whether open vino service. + + + + false + Whether xrdp service activice + + This key is used to record whether open xrdp service. + + diff --git a/debian/changelog b/debian/changelog index 05012fe..ca570c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ukui-control-center (3.22.1.25-ok16) yangtze; urgency=medium + + * bug#无 + * 需求:无 + * 任务:重新编译代码,解决编译问题 + * 其他改动:无 + + -- zhoubin Sat, 13 May 2023 15:53:27 +0800 + ukui-control-center (3.22.1.25-ok15) yangtze; urgency=medium * bug#I6YPX8 【X】【控制面板】打印机界面点击添加无反应 diff --git a/libukcc/interface/common.cpp b/libukcc/interface/common.cpp index 38dbfc4..fcdf5aa 100644 --- a/libukcc/interface/common.cpp +++ b/libukcc/interface/common.cpp @@ -294,25 +294,25 @@ bool Common::buriedSettings(QString pluginName, QString settingsName, QString ac #ifdef SP2 // 埋点数据 char appName[] = "ukui-control-center"; - QString message; - if (settingsName != nullptr) { - message = pluginName + "/" + settingsName; - } else { - message = pluginName; - } - QByteArray ba = message.toLatin1(); - char *messageType = ba.data(); - KBuriedPoint pt[2]; - pt[0].key = "action"; - std::string str = action.toStdString(); - pt[0].value = str.c_str(); + QByteArray actiontr = action.toLocal8Bit(); // toLocal8Bit 支持中文 + char *messageType = actiontr.data(); - pt[1].key = "value"; + KBuriedPoint pt[3]; + pt[0].key = "pluginName"; + std::string pluginStr = pluginName.toStdString(); + pt[0].value = pluginStr.c_str(); + + pt[1].key = "settingsName"; + std::string settingStr = settingsName.toStdString(); + pt[1].value = settingStr.c_str(); + + pt[2].key = "value"; std::string valueStr = value.toStdString(); - pt[1].value = valueStr.c_str(); + pt[2].value = valueStr.c_str(); - if (kdk_buried_point(appName , messageType , pt , 2)) { - qDebug() << __FUNCTION__ << "messageType:" << message << "action:" << action << "value:" << value << "buried point fail !" << __LINE__; + if (kdk_buried_point(appName , messageType , pt , 3) == -1) { + qDebug() << __FUNCTION__ << "messageType:" << action << "pluginName:" << pluginName + << "settingsName:" << settingsName << "value:" << value << "buried point fail !" << __LINE__; return false; } #endif diff --git a/libukcc/widgets/SettingWidget/addbutton.cpp b/libukcc/widgets/SettingWidget/addbutton.cpp index 861ba51..379c1f3 100644 --- a/libukcc/widgets/SettingWidget/addbutton.cpp +++ b/libukcc/widgets/SettingWidget/addbutton.cpp @@ -16,6 +16,7 @@ AddButton::AddButton(QWidget *parent, UkccFrame::BorderRadiusStyle style, bool h { this->setObjectName("AddButton"); this->setProperty("useButtonPalette", true); + this->setProperty("needTranslucent", true); this->setFlat(true); QHBoxLayout *addLyt = new QHBoxLayout; diff --git a/plugins/account/userinfo/changeusergroup.cpp b/plugins/account/userinfo/changeusergroup.cpp index 7d4dfe2..83acb13 100644 --- a/plugins/account/userinfo/changeusergroup.cpp +++ b/plugins/account/userinfo/changeusergroup.cpp @@ -366,6 +366,7 @@ void changeUserGroup::loadAllGroup() connect(allUserGroupTableView,&QTableView::clicked,this,[=](const QModelIndex &index){ bool idSetEnable = true; currentRow = index.row(); + Common::buriedSettings(QString("Userinfo"), this->windowTitle(), QString("clicked"), groupList->at(currentRow)->groupname); if (setTextDynamic(mUserGroupLineEdit, groupList->at(currentRow)->groupname)) { mUserGroupLineEdit->setToolTip(groupList->at(currentRow)->groupname); diff --git a/plugins/account/userinfo/creategroupdialog.cpp b/plugins/account/userinfo/creategroupdialog.cpp index ccf829c..bf896fd 100644 --- a/plugins/account/userinfo/creategroupdialog.cpp +++ b/plugins/account/userinfo/creategroupdialog.cpp @@ -51,7 +51,7 @@ void CreateGroupDialog::initUI() this->setFixedSize(480, 214); setAttribute(Qt::WA_DeleteOnClose); - mGroupNameLabel = new QLabel(tr("Name"), this); + mGroupNameLabel = new FixLabel(tr("Name"), this); mGroupNameLabel->setFixedSize(62, 36); mGroupNameEdit = new QLineEdit(this); mGroupNameEdit->installEventFilter(this); @@ -75,7 +75,7 @@ void CreateGroupDialog::initUI() mGroupNameTipHLayout->addStretch(); mGroupNameTipHLayout->addWidget(mGroupNameTipLabel); - mGroupIdLabel = new QLabel(tr("Id"), this); + mGroupIdLabel = new FixLabel(tr("Id"), this); mGroupIdLabel->setFixedSize(62, 36); mGroupIdEdit = new QLineEdit(this); mGroupIdEdit->setFixedSize(370, 36); @@ -90,7 +90,7 @@ void CreateGroupDialog::initUI() mCancelBtn->setFixedSize(96, 36); mCancelBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); mConfirmBtn = new QPushButton(tr("Confirm"), this); - mConfirmBtn->setFixedSize(96, 36); + mConfirmBtn->setMinimumSize(96, 36); mConfirmHLaout = new QHBoxLayout(this); mConfirmHLaout->setContentsMargins(0,0,0,0); diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp index 5b2d473..28190f4 100644 --- a/plugins/account/userinfo/userinfo.cpp +++ b/plugins/account/userinfo/userinfo.cpp @@ -254,7 +254,7 @@ void UserInfo::initUI(){ currentFrame->insertWidget(2, autoLoginFrame); //其他用户区域 - addUserBtn = new AddBtn; + addUserBtn = new AddButton(pluginWidget2); addUserBtn->setObjectName("addUser"); addUserHorLayout = new QHBoxLayout(); @@ -830,7 +830,7 @@ void UserInfo::setUserConnect(){ }); - connect(addUserBtn, &AddBtn::clicked, [=]{ + connect(addUserBtn, &AddButton::clicked, [=]{ Common::buriedSettings(name(), addUserBtn->objectName(), QString("settings")); showCreateUserNewDialog(); @@ -1112,11 +1112,6 @@ void UserInfo::_acquireAllUsersInfo(){ ui->currentUserFrame->setVisible(false); ui->autoLoginFrame->setVisible(false); } else { - if (allUserInfoMap.size() > 1) { - addUserBtn->setBtnStyle(AddBtn::Bottom); - } else { - addUserBtn->setBtnStyle(AddBtn::Box); - } ui->currentUserFrame->setVisible(true); ui->autoLoginFrame->setVisible(true); } diff --git a/plugins/account/userinfo/userinfo.h b/plugins/account/userinfo/userinfo.h index 64085a7..24d9ee1 100644 --- a/plugins/account/userinfo/userinfo.h +++ b/plugins/account/userinfo/userinfo.h @@ -44,6 +44,7 @@ #include "settinggroup.h" #include "titlelabel.h" #include "addbtn.h" +#include "addbutton.h" #include "qtdbus/systemdbusdispatcher.h" #include "qtdbus/userdispatcher.h" @@ -130,7 +131,7 @@ public: bool isEnable() const Q_DECL_OVERRIDE; public: - AddBtn * addUserBtn; + AddButton *addUserBtn; TitleLabel * currentLabel; TitleLabel * othersLabel; diff --git a/plugins/account/userinfo/userinfo.pro b/plugins/account/userinfo/userinfo.pro index 0cd46a3..5ead1f4 100644 --- a/plugins/account/userinfo/userinfo.pro +++ b/plugins/account/userinfo/userinfo.pro @@ -26,9 +26,8 @@ target.path = $${PLUGIN_INSTALL_DIRS} INCLUDEPATH += \ $$PROJECT_ROOTDIR \ -LIBS += -L$$[QT_INSTALL_LIBS] -lcrypt -lpolkit-qt5-core-1 -lpam -lkysec -lpwquality -lkylin_chkname +LIBS += -L$$[QT_INSTALL_LIBS] -lcrypt -lpolkit-qt5-core-1 -lpam -lpwquality -lkylin_chkname DEFINES += ENABLEPQ -DEFINES += WITHKYSEC ##加载gio库和gio-unix库 CONFIG += link_pkgconfig \ diff --git a/plugins/application/autoboot/autoboot.cpp b/plugins/application/autoboot/autoboot.cpp index 70fb871..38eaa19 100644 --- a/plugins/application/autoboot/autoboot.cpp +++ b/plugins/application/autoboot/autoboot.cpp @@ -195,7 +195,7 @@ void AutoBoot::initAutoUI() mAutoWidget->getAutobootWidget()->addWidget(mAutoWidget->getAddWidget()); mAutobootDBus->call("setApplist", mAutoAppList); connect(checkSignalMapper, SIGNAL(mapped(QString)), this, SLOT(checkboxChangedSlot(QString))); - connect(mAutoWidget->getAddBtn(), &AddBtn::clicked, this, &AutoBoot::addAppSlot); + connect(mAutoWidget->getAddBtn(), &AddButton::clicked, this, &AutoBoot::addAppSlot); } void AutoBoot::initItem(AutoApp &it) diff --git a/plugins/application/autoboot/autoboot.h b/plugins/application/autoboot/autoboot.h index 7ed4648..663a094 100644 --- a/plugins/application/autoboot/autoboot.h +++ b/plugins/application/autoboot/autoboot.h @@ -27,7 +27,6 @@ #include "common.h" #include "titlelabel.h" #include "hoverwidget.h" -#include "addbtn.h" #include "switchwidget.h" #include "settinggroup.h" #include "ukccframe.h" diff --git a/plugins/application/autoboot/autobootui.cpp b/plugins/application/autoboot/autobootui.cpp index 6e70f77..4fbd31a 100644 --- a/plugins/application/autoboot/autobootui.cpp +++ b/plugins/application/autoboot/autobootui.cpp @@ -13,7 +13,7 @@ void AutoBootUi::initUi() vLyt->setContentsMargins(0, 0, 0, 0); TitleLabel *mTitleLabel = new TitleLabel(this); - //~ contents_path /autoboot/Autoboot Settings + //~ contents_path /Autoboot/Autoboot Settings mTitleLabel->setText(tr("Autoboot Settings")); mAutobootWidget = new SettingGroup(this); @@ -22,9 +22,8 @@ void AutoBootUi::initUi() mAddWidget->setLineWidth(0); QHBoxLayout *Lyt = new QHBoxLayout(mAddWidget); Lyt->setContentsMargins(0, 0, 0, 0); - mAddBtn = new AddBtn(mAddWidget); + mAddBtn = new AddButton(mAddWidget); //~ contents_path /autoboot/Add - mAddBtn->setBtnStyle(AddBtn::Bottom); Lyt->addWidget(mAddBtn); vLyt->addWidget(mTitleLabel); diff --git a/plugins/application/autoboot/autobootui.h b/plugins/application/autoboot/autobootui.h index cdd7212..97c2eac 100644 --- a/plugins/application/autoboot/autobootui.h +++ b/plugins/application/autoboot/autobootui.h @@ -6,7 +6,7 @@ #include "titlelabel.h" #include "hoverwidget.h" -#include "addbtn.h" +#include "addbutton.h" #include "switchwidget.h" #include "settinggroup.h" #include "ukccframe.h" @@ -29,7 +29,7 @@ public: return mAddWidget; } - AddBtn *getAddBtn() + AddButton *getAddBtn() { return mAddBtn; } @@ -37,7 +37,7 @@ public: private: SettingGroup *mAutobootWidget = nullptr; UkccFrame *mAddWidget = nullptr; - AddBtn *mAddBtn = nullptr; + AddButton *mAddBtn = nullptr; }; diff --git a/plugins/devices/keyboard/keyboardui.cpp b/plugins/devices/keyboard/keyboardui.cpp index 6c86902..e7554ff 100644 --- a/plugins/devices/keyboard/keyboardui.cpp +++ b/plugins/devices/keyboard/keyboardui.cpp @@ -55,6 +55,7 @@ void KeyboardUi::setDelayFrame() /* delay */ //~ contents_path /Keyboard/Delay mDelayFrame = new SliderWidget(tr("Delay"), false, this); + mDelayFrame->slider()->setSliderType(KSliderType::StepSlider); mDelayFrame->setObjectName("Delay"); mDelayFrame->setLeftText(tr("Short")); mDelayFrame->setRightText(tr("Long")); diff --git a/plugins/devices/printer/printer.cpp b/plugins/devices/printer/printer.cpp index be55f4c..c7895f0 100644 --- a/plugins/devices/printer/printer.cpp +++ b/plugins/devices/printer/printer.cpp @@ -157,9 +157,9 @@ void Printer::initComponent() QHBoxLayout *hLyt = new QHBoxLayout(mAddWidget); hLyt->setContentsMargins(0, 0, 0, 0); //~ contents_path /Printer/Add - AddBtn *addBtn = new AddBtn(pluginWidget); + AddButton *addBtn = new AddButton(pluginWidget); hLyt->addWidget(addBtn); - connect(addBtn, &AddBtn::clicked, this, &Printer::runExternalApp); + connect(addBtn, &AddButton::clicked, this, &Printer::runExternalApp); } diff --git a/plugins/devices/printer/printer.h b/plugins/devices/printer/printer.h index 29f1c0e..a3a1707 100644 --- a/plugins/devices/printer/printer.h +++ b/plugins/devices/printer/printer.h @@ -32,10 +32,10 @@ #include "hoverbtn.h" #include "titlelabel.h" #include "fixlabel.h" -#include "addbtn.h" #include "settinggroup.h" #include "ukccframe.h" #include "printerbtn.h" +#include "addbutton.h" namespace Ui { diff --git a/plugins/devices/shortcut/addshortcutdialog.ui b/plugins/devices/shortcut/addshortcutdialog.ui index ad97b12..c4f782f 100644 --- a/plugins/devices/shortcut/addshortcutdialog.ui +++ b/plugins/devices/shortcut/addshortcutdialog.ui @@ -359,7 +359,7 @@ - 96 + 16777215 16777215 diff --git a/plugins/devices/shortcut/shortcut.cpp b/plugins/devices/shortcut/shortcut.cpp index e4375f0..f2aba4c 100644 --- a/plugins/devices/shortcut/shortcut.cpp +++ b/plugins/devices/shortcut/shortcut.cpp @@ -178,7 +178,6 @@ void Shortcut::connectUiSignals() connect(addDialog, &AddShortcutDialog::shortcutInfoSignal, [=](QString path, QString name, QString exec, QString key){ createNewShortcut(path, name, exec, key, true, true); - Common::buriedSettings(this->name(), QString("createNewShortcut"), QString("settings"), key); shortcutInterface->call("updateShortcut"); }); Common::buriedSettings(this->name(), QString("AddBtn"), QString("clicked")); @@ -234,6 +233,9 @@ void Shortcut::createNewShortcut(QString path, QString name, QString exec, QStri } else { availablepath = path; // 更新快捷键 + if (convertFlag) { + Common::buriedSettings(name, exec, QString("settings"), key); + } // 更新数据 for (int i = 0; i < customEntryList.count(); i++) { if (customEntryList[i].gsPath == availablepath) { diff --git a/plugins/devices/shortcut/shortcutui.cpp b/plugins/devices/shortcut/shortcutui.cpp index 784a353..5f50e6d 100644 --- a/plugins/devices/shortcut/shortcutui.cpp +++ b/plugins/devices/shortcut/shortcutui.cpp @@ -274,7 +274,8 @@ void ShortcutUi::addCustomShortcut(KeyEntry keyEntry, KeyEntryList *systemEntryL return; } -QString ShortcutUi::getShowShortcutString(QString src) { +QString ShortcutUi::getShowShortcutString(QString src) +{ src.replace("<",""); src.replace(">"," "); src.replace(" or ",tr(" or ")); @@ -284,7 +285,7 @@ QString ShortcutUi::getShowShortcutString(QString src) { str += temp_list.at(i) .left(1).toUpper() + temp_list.at(i) - .mid(1, temp_list.at(i).length() - 1).toLower(); + .mid(1, temp_list.at(i).length() - 1); str += " "; } str.replace("Or","or"); diff --git a/plugins/personalized/fonts/fonts.cpp b/plugins/personalized/fonts/fonts.cpp index acf04e8..39b5610 100644 --- a/plugins/personalized/fonts/fonts.cpp +++ b/plugins/personalized/fonts/fonts.cpp @@ -146,6 +146,7 @@ void Fonts::setupConnect(){ connectToServer(); connect(mSlider, &KSlider::valueChanged, [=](int value){ float size = sliderConvertToSize(value); + Common::buriedSettings(name(), ui->fontSizeLabel->text(), QString("settings"), QString::number(size, 'f', 1)); // 获取当前字体信息 getCurrentFontInfo(); @@ -160,6 +161,7 @@ void Fonts::setupConnect(){ connect(ui->fontSelectComBox, &QComboBox::currentTextChanged, [=](QString text){ // 获取当前字体信息 getCurrentFontInfo(); + Common::buriedSettings(name(), ui->fontSelectLabel->text(), QString("select"), text); ifsettings->set(GTK_FONT_KEY, QVariant(QString("%1 %2").arg(text).arg(gtkfontStrList.at(1)))); ifsettings->set(DOC_FONT_KEY, QVariant(QString("%1 %2").arg(text).arg(docfontStrList.at(1)))); stylesettings->set(SYSTEM_NAME_KEY, QVariant(QString("%1").arg(text))); @@ -169,6 +171,7 @@ void Fonts::setupConnect(){ connect(ui->monoSelectComBox, &QComboBox::currentTextChanged, [=](QString text){ // 获取当前字体信息 QVariant monoName = QVariant(QString("%1 %2").arg(text).arg(monospacefontStrList.at(1))); + Common::buriedSettings(name(), ui->monoSelectLabel->text(), QString("select"), monoName.toString()); getCurrentFontInfo(); ifsettings->set(MONOSPACE_FONT_KEY, monoName); mGnomeSettings->set(MONOSPACE_FONT_KEY, monoName); diff --git a/plugins/personalized/fonts/fonts.h b/plugins/personalized/fonts/fonts.h index a8acd43..e0a32aa 100644 --- a/plugins/personalized/fonts/fonts.h +++ b/plugins/personalized/fonts/fonts.h @@ -33,6 +33,7 @@ #include #include "shell/interface.h" +#include "common.h" using namespace kdk; diff --git a/plugins/personalized/wallpaper/colordialog.cpp b/plugins/personalized/wallpaper/colordialog.cpp index 1e078ca..e8a9552 100644 --- a/plugins/personalized/wallpaper/colordialog.cpp +++ b/plugins/personalized/wallpaper/colordialog.cpp @@ -86,8 +86,7 @@ void ColorDialog::paintEvent(QPaintEvent *event) void ColorDialog::setupInit() { qDebug() << "setup init"; - ui->cancelBtn->setProperty("useButtonPalette", true); - ui->okBtn->setProperty("useButtonPalette", true); + ui->label->setText(tr("Choose a custom color")); // 窗口属性 setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);//开启窗口无边框 setAttribute(Qt::WA_TranslucentBackground); diff --git a/plugins/personalized/wallpaper/colordialog.ui b/plugins/personalized/wallpaper/colordialog.ui index 94c98c2..a83c91c 100644 --- a/plugins/personalized/wallpaper/colordialog.ui +++ b/plugins/personalized/wallpaper/colordialog.ui @@ -83,7 +83,7 @@ - 选择自定义颜色 + Choose a custom color diff --git a/plugins/system/about/aboutui.cpp b/plugins/system/about/aboutui.cpp index 29b1d18..7be7b00 100644 --- a/plugins/system/about/aboutui.cpp +++ b/plugins/system/about/aboutui.cpp @@ -371,8 +371,10 @@ void AboutUi::initSearchText() mDesktopLabel_1->setText(tr("Desktop")); //~ contents_path /About/User mUsernameLabel_1->setText(tr("User")); - //~ contents_path /About/Status + //~ contents_path /About/Status mStatusLabel_1->setText(tr("Status")); + //~ contents_path /About/Active + mActivationBtn->setText(tr("Active")); mSequenceLabel_1->setText(tr("Serial")); } diff --git a/plugins/system/display/brightnessFrame.cpp b/plugins/system/display/brightnessFrame.cpp index 4438b31..fd0958b 100644 --- a/plugins/system/display/brightnessFrame.cpp +++ b/plugins/system/display/brightnessFrame.cpp @@ -103,7 +103,8 @@ void BrightnessFrame::setTextLabelName(QString text) void BrightnessFrame::setTextLabelValue(QString text) { - this->labelValue->setText(text); + qDebug() << Q_FUNC_INFO << text; + this->labelValue->setText(text + "%"); } void BrightnessFrame::runConnectThread(const bool &openFlag) diff --git a/plugins/system/display/controlpanel.cpp b/plugins/system/display/controlpanel.cpp index e65d2f0..f05af12 100644 --- a/plugins/system/display/controlpanel.cpp +++ b/plugins/system/display/controlpanel.cpp @@ -58,8 +58,7 @@ void ControlPanel::addOutput(const KScreen::OutputPtr &output, bool connectChang this, &ControlPanel::slotOutputConnectedChanged); } - if (!output->isConnected()) - return; + if (!output->isConnected() || (output->size() == QSize(-1, -1))) return; OutputConfig *outputCfg = new OutputConfig(this); outputCfg->setVisible(false); diff --git a/plugins/system/display/getBrightnessThread.cpp b/plugins/system/display/getBrightnessThread.cpp index c0cbcc5..a3b8a5e 100644 --- a/plugins/system/display/getBrightnessThread.cpp +++ b/plugins/system/display/getBrightnessThread.cpp @@ -39,8 +39,9 @@ void GetBrightnessThread::run() } reply = ukccIfc.call("getDisplayBrightness", this->edidHash, this->i2cBus); if (reply.isValid() && reply.value() >= 0 && reply.value() <= 100) { - Q_EMIT getBrightnessFinished(reply.value()); - return; + qDebug() << Q_FUNC_INFO << "the ddc brightness is: " << reply.value() << this->edidHash << this->i2cBus; + Q_EMIT getBrightnessFinished(reply.value()); + return; } times--; msleep(100); diff --git a/plugins/system/display_hw/brightnessFrame.cpp b/plugins/system/display_hw/brightnessFrame.cpp index fa06140..607e7d7 100644 --- a/plugins/system/display_hw/brightnessFrame.cpp +++ b/plugins/system/display_hw/brightnessFrame.cpp @@ -39,5 +39,5 @@ void BrightnessFrame::setTextLableName(QString text) void BrightnessFrame::setTextLableValue(QString text) { - this->labelValue->setText(text); + this->labelValue->setText(text + "%"); } diff --git a/plugins/system/vino/vino.cpp b/plugins/system/vino/vino.cpp index 491d766..b077989 100644 --- a/plugins/system/vino/vino.cpp +++ b/plugins/system/vino/vino.cpp @@ -47,6 +47,10 @@ QWidget *Vino::pluginUi() if (mFirstLoad) { mFirstLoad = false; mVinoWidget = new VinoUi; + mServiceDbus = new QDBusInterface("com.control.center.qt.systemdbus", + "/", + "com.control.center.interface", + QDBusConnection::systemBus(), this); mVinoDBus = new QDBusInterface("org.ukui.ukcc.session", "/Vino", "org.ukui.ukcc.session.Vino", @@ -55,6 +59,7 @@ QWidget *Vino::pluginUi() qCritical() << "org.ukui.ukcc.session.Vino DBus error:" << mVinoDBus->lastError(); } else { initStatus(); + initServiceStatus(); initConnection(); } } @@ -102,7 +107,51 @@ void Vino::setVinoService(bool status) } } -void Vino::enableSlot(bool status) +void Vino::enabledSlot(bool status) +{ + if (status) { + mVinoDBus->call("setVinoKey", kEnableKey, true); + if (isExsitXrdp) { + if (mServiceDbus->isValid()) { + mVinoWidget->getXrdpEnableWidget()->setChecked(mVinoDBus->property("isXrdp").toBool()); + setXrdpService(mVinoDBus->property("isXrdp").toBool()); + } + mVinoWidget->getXrdpEnableWidget()->setVisible(true); + } + mVinoWidget->getVinoEnableWidget()->setChecked(mVinoDBus->property("isVino").toBool()); + vinoEnableSlot(mVinoDBus->property("isVino").toBool()); + mVinoWidget->getVinoFrame()->setVisible(true); + } else { + mVinoDBus->call("setVinoKey", kEnableKey, false); + if (isExsitXrdp) { + mVinoDBus->call("setVinoKey", kXrdpEnableKey, mVinoWidget->getXrdpEnableWidget()->isChecked()); + mVinoWidget->getXrdpEnableWidget()->hide(); + if (mServiceDbus->isValid()) { + setXrdpService(false); + } + mVinoWidget->getXrdpEnableWidget()->blockSignals(true); + mVinoWidget->getXrdpEnableWidget()->setChecked(false); + mVinoWidget->getXrdpEnableWidget()->blockSignals(false); + } + mVinoDBus->call("setVinoKey", kVinoEnableKey, mVinoWidget->getVinoEnableWidget()->isChecked()); + vinoEnableSlot(false); + mVinoWidget->getVinoFrame()->setVisible(false); + } +} + +void Vino::xrdpEnabledSlot(bool status) +{ + mVinoDBus->call("setVinoKey", kXrdpEnableKey, status); + if (isExsitXrdp) { + if (mServiceDbus->isValid()) { + setXrdpService(status); + } + } else { + mVinoWidget->getXrdpEnableWidget()->setVisible(false); + } + +} +void Vino::vinoEnableSlot(bool status) { mVinoWidget->setFrameVisible(status); setVinoService(status); @@ -121,15 +170,22 @@ void Vino::accessSlot(bool status) void Vino::pwdEnableSlot(bool status) { if (status) { - mVinoWidget->getPwdinputBtn()->setVisible(mVinoDBus->property("password").toString() == "keyring" ? false:true); - mVinoWidget->getPwdinputBtn()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); - pwdInputSlot(); - mVinoWidget->getPwdinputBtn()->setVisible(status); - if (mVinoDBus->property("method").toString() == "none") { - mVinoWidget->getSecurityPwdWidget()->setChecked(false); + mVinoWidget->getPwdLabel()->setVisible(secpwd == "keyring" ? false:true); + if (mVinoWidget->getPwdLabel()->isVisible()) { + mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); + mVinoDBus->call("setVinoKey", kAuthenticationKey, "vnc"); + } else { + pwdInputSlot(); + if (mVinoDBus->property("method").toString() == "none") { + mVinoWidget->getSecurityPwdWidget()->setChecked(false); + } } + + mVinoWidget->getPwdLabel()->setVisible(mVinoWidget->getSecurityPwdWidget()->isChecked()); + mVinoWidget->getPwdinputBtn()->setVisible(secpwd == "keyring" ? false:true); + } else { - mVinoWidget->getPwdinputBtn()->setVisible(false); + mVinoWidget->getPwdLabel()->setVisible(false); mVinoDBus->call("setVinoKey", kAuthenticationKey, "none"); } } @@ -138,14 +194,24 @@ void Vino::pwdInputSlot() { InputPwdDialog *dialog = new InputPwdDialog(mVinoWidget); dialog->exec(); - mVinoWidget->getPwdinputBtn()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); + mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); } void Vino::initConnection() { connect(mVinoWidget->getEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { + Common::buriedSettings(QStringLiteral("Vino"), mVinoWidget->getEnableWidget()->objectName(), QString("settings"), status ? "true" : "false"); + enabledSlot(status); + }); + + connect(mVinoWidget->getXrdpEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { + Common::buriedSettings(QStringLiteral("Vino"), mVinoWidget->getXrdpEnableWidget()->objectName(), QString("settings"), status ? "true" : "false"); + xrdpEnabledSlot(status); + }); + + connect(mVinoWidget->getVinoEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { Common::buriedSettings(QStringLiteral("Vino"), "whether allow others to connect to your desktop remotely", QString("settings"), status ? "true" : "false"); - enableSlot(status); + vinoEnableSlot(status); }); connect(mVinoWidget->getViewWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { Common::buriedSettings(QStringLiteral("Vino"), "whether allow others to control your desktop remotely", QString("settings"), status ? "true" : "false"); @@ -171,24 +237,80 @@ void Vino::initStatus() bool isPrompt = mVinoDBus->property("isPrompt").toBool(); QString pwd = mVinoDBus->property("method").toString(); - QString secpwd = mVinoDBus->property("password").toString(); + secpwd = mVinoDBus->property("password").toString(); + mVinoWidget->getPwdinputBtn()->setVisible(secpwd == "keyring" ? false:true); mVinoWidget->getSecurityWidget()->setChecked(isPrompt); mVinoWidget->getViewWidget()->setChecked(!isShared); if (pwd == "vnc") { if (secpwd == "keyring") { mVinoWidget->getSecurityPwdWidget()->setChecked(false); - mVinoWidget->getPwdinputBtn()->hide(); + mVinoWidget->getPwdLabel()->hide(); mVinoDBus->call("setVinoKey", kAuthenticationKey, "none"); } else { mVinoWidget->getSecurityPwdWidget()->setChecked(true); - mVinoWidget->getPwdinputBtn()->setText(QByteArray::fromBase64(secpwd.toLatin1())); + mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(secpwd.toLatin1())); } } else { mVinoWidget->getSecurityPwdWidget()->setChecked(false); - mVinoWidget->getPwdinputBtn()->setVisible(false); + mVinoWidget->getPwdLabel()->setVisible(false); } mVinoWidget->setFrameVisible(mVinoDBus->property("isActive").toBool()); } +void Vino::initServiceStatus() +{ + bool isEnabled = mVinoDBus->property("isEnable").toBool(); + if (isEnabled) { + mVinoWidget->getEnableWidget()->setChecked(true); + XrdpServiceStatus xrdpstatus = getXrdpServiceStatus(); + switch (xrdpstatus) { + case NONE: + mVinoWidget->getXrdpEnableWidget()->hide(); + isExsitXrdp = false; + break; + case RUNNING: + mVinoWidget->getXrdpEnableWidget()->setChecked(true); + break; + case INACTIVE: + mVinoWidget->getXrdpEnableWidget()->setChecked(false); + break; + } + } else { + mVinoWidget->getEnableWidget()->setChecked(false); + mVinoWidget->getXrdpEnableWidget()->hide(); + mVinoWidget->getVinoFrame()->hide(); + } +} + +XrdpServiceStatus Vino::getXrdpServiceStatus() +{ + QProcess process; + QString cmd = "systemctl status xrdp.service | grep Active:"; + process.start("bash", QStringList() <<"-c" << cmd); + process.waitForFinished(); + QString strResult = process.readAllStandardOutput()+process.readAllStandardError(); + if (strResult.isEmpty()) { + return NONE; + } + cmd = "systemctl is-failed xrdp.service"; + process.start("bash", QStringList() <<"-c" << cmd); + process.waitForFinished(); + strResult = process.readAllStandardOutput()+process.readAllStandardError(); + if ((strResult.replace("\n", "") == "active")) + return RUNNING; + else + return INACTIVE; + +} + +void Vino::setXrdpService(bool status) +{ + QTimer::singleShot(1, this, [=]() { + QtConcurrent::run([=]() { + mServiceDbus->call("setXrdpService", status); + }); + + }); +} diff --git a/plugins/system/vino/vino.h b/plugins/system/vino/vino.h index 928ed88..ccbe069 100644 --- a/plugins/system/vino/vino.h +++ b/plugins/system/vino/vino.h @@ -23,9 +23,15 @@ #include #include #include +#include #include "vinoui.h" #include "shell/interface.h" +enum XrdpServiceStatus { + RUNNING, + INACTIVE, + NONE +}; class Vino : public QObject, CommonInterface { Q_OBJECT @@ -46,6 +52,7 @@ public: void initConnection(); void initStatus(); + void initServiceStatus(); private: VinoUi *mVinoWidget; @@ -53,14 +60,21 @@ private: int pluginType; bool mFirstLoad; + bool isExsitXrdp = true; + QString secpwd; QDBusInterface *mVinoDBus; + QDBusInterface *mServiceDbus; private: bool isExistVino() const; void setVinoService(bool status); + XrdpServiceStatus getXrdpServiceStatus(); + void setXrdpService(bool status); private slots: - void enableSlot(bool status); + void enabledSlot(bool status); + void xrdpEnabledSlot(bool status); + void vinoEnableSlot(bool status); void viewBoxSlot(bool status); void accessSlot(bool status); void pwdEnableSlot(bool status); diff --git a/plugins/system/vino/vino.pro b/plugins/system/vino/vino.pro index b0c6af0..8eaec75 100644 --- a/plugins/system/vino/vino.pro +++ b/plugins/system/vino/vino.pro @@ -3,7 +3,7 @@ include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) -QT += widgets +QT += widgets concurrent greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus diff --git a/plugins/system/vino/vinoui.cpp b/plugins/system/vino/vinoui.cpp index 2a11643..65073ac 100644 --- a/plugins/system/vino/vinoui.cpp +++ b/plugins/system/vino/vinoui.cpp @@ -10,34 +10,44 @@ void VinoUi::initUi() QVBoxLayout *vLyt = new QVBoxLayout(this); vLyt->setContentsMargins(0, 0, 0, 0); - SettingGroup *mVinoFrame = new SettingGroup; + mVinoFrame = new SettingGroup; mVinoTitleLabel = new TitleLabel(this); mVinoTitleLabel->setText(tr("Remote Desktop")); - mEnableWidget = new SwitchWidget(tr("Allow others to view your desktop")); + mEnableWidget = new SwitchWidget(tr("Connect to your desktop remotely"),this); + mEnableWidget->setObjectName("Connect to your desktop remotely"); + //~ contents_path /Vino/Allow others to connect to your desktop remotely using RDP + mXrdpEnableWidget = new SwitchWidget(tr("Allow others to connect to your desktop remotely using RDP"), this); + mXrdpEnableWidget->setObjectName("Allow others to connect to your desktop remotely using RDP"); + //~ contents_path /Vino/Allow others to connect to your desktop remotely using VNC + mVinoEnableWidget = new SwitchWidget(tr("Allow others to connect to your desktop remotely using VNC"), this); + mVinoEnableWidget->setObjectName("Allow others to connect to your desktop remotely using VNC"); //~ contents_path /Vino/Allow connection to control screen mViewWidget = new SwitchWidget(tr("Allow connection to control screen")); //~ contents_path /Vino/You must confirm every visit for this machine mSecurityWidget = new SwitchWidget(tr("You must confirm every visit for this machine")); //~ contents_path /Vino/Require user to enter this password: mSecurityPwdWidget = new SwitchWidget(tr("Require user to enter this password: ")); - mPwdinputBtn = new QPushButton(this); - mSecurityPwdWidget->insertWidget(1, mPwdinputBtn); + mPwdstrLabel = new QLabel(this); + mPwdinputBtn = new QPushButton(tr("Edit"), this); + mSecurityPwdWidget->insertWidget(1, mPwdstrLabel); + mSecurityPwdWidget->insertWidget(3, mPwdinputBtn); - - mVinoFrame->addWidget(mEnableWidget); + mVinoFrame->addWidget(mVinoEnableWidget); mVinoFrame->addWidget(mViewWidget); mVinoFrame->addWidget(mSecurityWidget); mVinoFrame->addWidget(mSecurityPwdWidget); vLyt->addWidget(mVinoTitleLabel); + vLyt->addWidget(mEnableWidget); + vLyt->addWidget(mXrdpEnableWidget); vLyt->addWidget(mVinoFrame); vLyt->addStretch(); } void VinoUi::setFrameVisible(bool visible) { - mEnableWidget->setChecked(visible); + mVinoEnableWidget->setChecked(visible); mViewWidget->setVisible(visible); mSecurityWidget->setVisible(visible); mSecurityPwdWidget->setVisible(visible); diff --git a/plugins/system/vino/vinoui.h b/plugins/system/vino/vinoui.h index 093567a..036d0f5 100644 --- a/plugins/system/vino/vinoui.h +++ b/plugins/system/vino/vinoui.h @@ -19,6 +19,9 @@ #include "ukccframe.h" const QByteArray kVinoSchemas = "org.gnome.Vino"; +const QString kEnableKey = "enabled"; +const QString kXrdpEnableKey = "xrdp-enabled"; +const QString kVinoEnableKey = "vino-enabled"; const QString kVinoViewOnlyKey = "view-only"; const QString kVinoPromptKey = "prompt-enabled"; const QString kAuthenticationKey = "authentication-methods"; @@ -37,20 +40,28 @@ public: void setFrameVisible(bool visible); SwitchWidget *getEnableWidget() {return mEnableWidget;} + SwitchWidget *getXrdpEnableWidget() {return mXrdpEnableWidget;} + SettingGroup *getVinoFrame() {return mVinoFrame;} + SwitchWidget *getVinoEnableWidget() {return mVinoEnableWidget;} SwitchWidget *getViewWidget() {return mViewWidget;} SwitchWidget *getSecurityWidget() {return mSecurityWidget;} SwitchWidget *getSecurityPwdWidget() {return mSecurityPwdWidget;} + QLabel *getPwdLabel() {return mPwdstrLabel;} QPushButton *getPwdinputBtn() {return mPwdinputBtn;} private: - SwitchWidget *mEnableWidget; - SwitchWidget *mViewWidget; - SwitchWidget *mSecurityWidget; - SwitchWidget *mSecurityPwdWidget; + SwitchWidget *mEnableWidget; // 允许其他人查看桌面 + SwitchWidget *mXrdpEnableWidget; // 允许其他人使用rdp远程连接 + SettingGroup *mVinoFrame; + SwitchWidget *mVinoEnableWidget; // 允许其他人使用vnc远程连接 + SwitchWidget *mViewWidget; // 允许连接控制屏幕 + SwitchWidget *mSecurityWidget; // 为本机确认每次访问 + SwitchWidget *mSecurityPwdWidget;// 要求用户输入密码 TitleLabel *mVinoTitleLabel; + QLabel *mPwdstrLabel; QPushButton *mPwdinputBtn; }; diff --git a/plugins/time-language/datetime/timelabel.cpp b/plugins/time-language/datetime/timelabel.cpp index 41a43f0..a7f2883 100644 --- a/plugins/time-language/datetime/timelabel.cpp +++ b/plugins/time-language/datetime/timelabel.cpp @@ -64,7 +64,7 @@ void TimeLabel::setTimeText() if ("cn" == areaInterface->property("dateFormat").toString()) { dateString = datetime.toString("yyyy/MM/dd ddd").replace("周", "星期"); } else { - dateString = datetime.toString("yyyy-MM-dd ddd"); + dateString = datetime.toString("yyyy-MM-dd ddd").replace("周", "星期"); } if (dateString != date) { date = dateString; diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp index 55484c8..c3b597f 100644 --- a/registeredQDbus/sysdbusregister.cpp +++ b/registeredQDbus/sysdbusregister.cpp @@ -1143,3 +1143,12 @@ QString SysdbusRegister::getSysInstallTime(const QString &part) } return QString(); } + +void SysdbusRegister::setXrdpService(bool status) +{ + QString cmd = QString("systemctl %1 xrdp.service").arg(status ? "start" : "stop"); + system(cmd.toUtf8().data()); + return; +} + + diff --git a/registeredQDbus/sysdbusregister.h b/registeredQDbus/sysdbusregister.h index 6ecc329..dbf3e2b 100644 --- a/registeredQDbus/sysdbusregister.h +++ b/registeredQDbus/sysdbusregister.h @@ -178,6 +178,8 @@ public slots: // 获取系统安装时间 Q_SCRIPTABLE QString getSysInstallTime(const QString &part); + //设置xrdp服务 + Q_SCRIPTABLE void setXrdpService(bool status); }; #endif // SYSDBUSREGISTER_H diff --git a/registeredSession/main.cpp b/registeredSession/main.cpp index 774d838..e9a688c 100644 --- a/registeredSession/main.cpp +++ b/registeredSession/main.cpp @@ -19,6 +19,7 @@ #include "plugins/screenlock/screenlockinterface.h" #include "plugins/shortcut/shortcutinterface.h" #include "plugins/screensaver/screensaverinterface.h" +#include "plugins/vino/vinointerface.h" void registerPlugins(const QString &path, QObject *object, QDBusConnection &connection) { if (!connection.registerObject(path, object, QDBusConnection::ExportAllSlots | @@ -66,6 +67,7 @@ int main(int argc, char *argv[]) plugins["/Screenlock"] = new ScreenlockInterface; plugins["/Shortcut"] = new ShortcutInterface; plugins["/Screensaver"] = new ScreensaverInterface; + plugins["/Vino"] = new VinoInterface; for (std::map::value_type plugin : plugins) registerPlugins(plugin.first, plugin.second, sessionBus); diff --git a/registeredSession/plugins/vino/vinointerface.cpp b/registeredSession/plugins/vino/vinointerface.cpp index 38f7af2..da94c11 100644 --- a/registeredSession/plugins/vino/vinointerface.cpp +++ b/registeredSession/plugins/vino/vinointerface.cpp @@ -5,11 +5,15 @@ VinoInterface::VinoInterface() { mVinoGsettings = UniversalInterface::self()->gnomeVinoGsettings(); + mUkuiVinoGsettings = UniversalInterface::self()->ukuiVinoGsettings(); mGsettingMap[kVinoViewOnlyKey] = QString("viewOnly"); mGsettingMap[kVinoPromptKey] = QString("promptEnabled"); mGsettingMap[kAuthenticationKey] = QString("authenticationMethods"); mGsettingMap[kVncPwdKey] = QString("vncPassword"); + mGsettingMap[kVinoEnableKey] = QString("vinoEnabled"); + mGsettingMap[kXrdpEnableKey] = QString("xrdpEnabled"); + mGsettingMap[kEnableKey] = QString("enabled"); } bool VinoInterface::getViewOnly() @@ -59,7 +63,36 @@ bool VinoInterface::getVinoServerStatus() process.waitForFinished(); bool isActive = process.readAllStandardOutput().replace("\n", "") == "active"; return isActive; +} +bool VinoInterface::getVinoStatus() +{ + if (mUkuiVinoGsettings->keys().contains("vinoEnabled")) { + return mUkuiVinoGsettings->get(kVinoEnableKey).toBool(); + } else { + qCritical() << "mUkuiVinoGsettings not contains the key: " << kVinoEnableKey; + } + return false; +} + +bool VinoInterface::getXrdpStatus() +{ + if (mUkuiVinoGsettings->keys().contains("xrdpEnabled")) { + return mUkuiVinoGsettings->get(kXrdpEnableKey).toBool(); + } else { + qCritical() << "mUkuiVinoGsettings not contains the key: " << kXrdpEnableKey; + } + return false; +} + +bool VinoInterface::getEnableStatus() +{ + if (mUkuiVinoGsettings->keys().contains("enabled")) { + return mUkuiVinoGsettings->get(kEnableKey).toBool(); + } else { + qCritical() << "mUkuiVinoGsettings not contains the key: " << kEnableKey; + } + return false; } void VinoInterface::setVinoKey(const QString &key, bool value) @@ -67,7 +100,13 @@ void VinoInterface::setVinoKey(const QString &key, bool value) if (mVinoGsettings->keys().contains(mGsettingMap[key])) { return mVinoGsettings->set(key, value); } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << key; + qCritical() << "mVinoGsettings not contains the key: " << key; + } + + if (mUkuiVinoGsettings->keys().contains(mGsettingMap[key])) { + return mUkuiVinoGsettings->set(key, value); + } else { + qCritical() << "mUkuiVinoGsettings not contains the key: " << key; } } diff --git a/registeredSession/plugins/vino/vinointerface.h b/registeredSession/plugins/vino/vinointerface.h index 68dcafd..aca3204 100644 --- a/registeredSession/plugins/vino/vinointerface.h +++ b/registeredSession/plugins/vino/vinointerface.h @@ -17,6 +17,9 @@ class VinoInterface : public QObject Q_PROPERTY(QString method READ getMethod) Q_PROPERTY(QString password READ getPassword) Q_PROPERTY(bool isActive READ getVinoServerStatus) + Q_PROPERTY(bool isVino READ getVinoStatus) + Q_PROPERTY(bool isXrdp READ getXrdpStatus) + Q_PROPERTY(bool isEnable READ getEnableStatus) public: VinoInterface(); @@ -27,6 +30,9 @@ protected: QString getMethod(); QString getPassword(); bool getVinoServerStatus(); + bool getVinoStatus(); + bool getXrdpStatus(); + bool getEnableStatus(); public Q_SLOTS: void setVinoKey(const QString &key, bool value); @@ -34,14 +40,17 @@ public Q_SLOTS: void setVinoKey(const QString &key, QByteArray value); private: + const QString kEnableKey = "enabled"; + const QString kXrdpEnableKey = "xrdp-enabled"; + const QString kVinoEnableKey = "vino-enabled"; const QString kVinoViewOnlyKey = "view-only"; const QString kVinoPromptKey = "prompt-enabled"; const QString kAuthenticationKey = "authentication-methods"; const QString kVncPwdKey = "vnc-password"; - QGSettings *mVinoGsettings = nullptr; + QGSettings *mVinoGsettings = nullptr; + QGSettings *mUkuiVinoGsettings = nullptr; QMap mGsettingMap; - }; #endif // VINOINTERFACE_H diff --git a/registeredSession/universalinterface.cpp b/registeredSession/universalinterface.cpp index 0964921..86182e6 100644 --- a/registeredSession/universalinterface.cpp +++ b/registeredSession/universalinterface.cpp @@ -164,6 +164,18 @@ QGSettings *UniversalInterface::gnomeVinoGsettings() return mGnomeVinoGsettings; } +QGSettings *UniversalInterface::ukuiVinoGsettings() +{ + if (!mUkuiVinoGsettings) { + const QByteArray id(UKUI_VINO_ID); + if (QGSettings::isSchemaInstalled(id)) { + mUkuiVinoGsettings = new QGSettings(id, QByteArray()); + } + } + return mUkuiVinoGsettings; +} + + QGSettings *UniversalInterface::ukccNoticeGsettings() { if (!mUkccNoticeGsettings) { diff --git a/registeredSession/universalinterface.h b/registeredSession/universalinterface.h index aca7505..74eed91 100644 --- a/registeredSession/universalinterface.h +++ b/registeredSession/universalinterface.h @@ -99,6 +99,13 @@ public: * @return QGSettings */ QGSettings *gnomeVinoGsettings(); + + /** + * @brief 获取org.ukui.control-center的gsetting + * + * @return QGSettings + */ + QGSettings *ukuiVinoGsettings(); /** * @brief 获取com.control.center.qt.systemdbus的dbus * @@ -138,6 +145,7 @@ private: const QByteArray UKCC_NOTICE_ID = QByteArray("org.ukui.control-center.notice"); const QByteArray UKUI_NOTICE_ID = QByteArray("org.ukui.notification.demo"); const QByteArray GNOME_VINO_ID = QByteArray("org.gnome.Vino"); + const QByteArray UKUI_VINO_ID = QByteArray("org.ukui.control-center"); private: QGSettings *mBackgroundGsettings = nullptr; @@ -153,6 +161,7 @@ private: QGSettings *mUkccNoticeGsettings = nullptr; QGSettings *mUkuiNoticeGsettings = nullptr; QGSettings *mGnomeVinoGsettings = nullptr; + QGSettings *mUkuiVinoGsettings = nullptr; QDBusInterface *mUkccSystemDbus = nullptr; QGSettings *mScreensaverGsettings = nullptr; QGSettings *mScreensaverDefaultGsettings = nullptr; diff --git a/shell/homepagewidget.cpp b/shell/homepagewidget.cpp index d23bba7..fd48ccb 100644 --- a/shell/homepagewidget.cpp +++ b/shell/homepagewidget.cpp @@ -279,7 +279,7 @@ void HomePageWidget::initUI() { if (moduleMap.keys().contains(tmpStruct.namei18nString)) { if (mModuleMap.isEmpty() || !mModuleMap.contains(tmpStruct.nameString.toLower()) || mModuleMap[tmpStruct.nameString.toLower()].toBool()) { firstFunc = tmpStruct.namei18nString; - Common::buriedSettings(tmpStruct.nameString, nullptr, "clicked"); + Common::buriedSettings(tmpStruct.nameString, nullptr, "home clicked"); //跳转 pmainWindow->functionBtnClicked(moduleMap.value(firstFunc)); break; diff --git a/shell/mainwindow.cpp b/shell/mainwindow.cpp index 1e85c0e..a451df9 100644 --- a/shell/mainwindow.cpp +++ b/shell/mainwindow.cpp @@ -360,7 +360,7 @@ void MainWindow::initUI() { //top left return button connect(backBtn, &QPushButton::clicked, this, [=]{ ui->stackedWidget->setCurrentIndex(0); - Utils::buriedSettings(backBtn->objectName(), nullptr, QString("clicked")); + Common::buriedSettings(backBtn->objectName(), nullptr, QString("clicked")); }); // 快捷参数 @@ -420,7 +420,7 @@ void MainWindow::initTileBar() { titleLayout = new QHBoxLayout(ui->titleWidget); ui->titleWidget->setLayout(titleLayout); ui->titleWidget->setObjectName("titleWidget"); - titleLayout->setContentsMargins(8, 2, 5, 2); + titleLayout->setContentsMargins(8, 2, 4, 2); titleLayout->setSpacing(0); m_searchWidget = new SearchWidget(this); m_searchWidget->setContextMenuPolicy(Qt::NoContextMenu); @@ -821,7 +821,7 @@ void MainWindow::initLeftsideBar() modulepageWidget->refreshPluginWidget(pluginInstance); // 埋点点击左侧导航插件 - Common::buriedSettings(pluginInstance->name(), nullptr, QString("clicked")); + Common::buriedSettings(pluginInstance->name(), nullptr, QString("left clicked")); } }); @@ -1096,7 +1096,7 @@ QMap MainWindow::exportModule(int type) { void MainWindow::pluginBtnClicked(QObject *plugin) { CommonInterface * pluginInstance = qobject_cast(plugin); - Common::buriedSettings(pluginInstance->name(), nullptr, "clicked"); + Common::buriedSettings(pluginInstance->name(), nullptr, "home clicked"); functionBtnClicked(plugin); } diff --git a/shell/res/i18n/bo_CN.ts b/shell/res/i18n/bo_CN.ts index 6e08a63..684211b 100644 --- a/shell/res/i18n/bo_CN.ts +++ b/shell/res/i18n/bo_CN.ts @@ -386,7 +386,13 @@ /About/Status - + + Active + འཁྲུག་ཆ་དོད་པོ་ + /About/Active + + + Serial གོ་རིམ་ལྟར་ན། @@ -453,7 +459,7 @@ AddButton - + Add ཁ་སྣོན་བརྒྱབ་པ། @@ -926,7 +932,7 @@ Autoboot Settings རང་འགུལ་གྱིས་སྒྲིག་བཀོད་སྒྲིག་བྱེད་པ། - /autoboot/Autoboot Settings + /Autoboot/Autoboot Settings @@ -1745,9 +1751,14 @@ you can restore them to ensure the integrity of your system. གླེང་མོལ། - 选择自定义颜色 - 选择自定义颜色 + 选择自定义颜色 + + + + + Choose a custom color + བདམས་པའི་མཚན་ཉིད་ཁ་མདོག @@ -1770,7 +1781,7 @@ you can restore them to ensure the integrity of your system. འགྲིགས། - + Custom color གོམས་སྲོལ་གྱི་ཁ་དོག @@ -3117,45 +3128,45 @@ change system settings /Keyboard/Delay - + Short མདོར་ན། - + Long རིང་བ། - + Speed མྱུར་ཚད། /Keyboard/Speed - + Slow དལ་མོ།དལ་མོ། - + Fast མགྱོགས་མྱུར། - + Input test ནང་འཇུག་ཚོད་ལྟ། /Keyboard/Input test - + Key tips འགག་རྩའི་མན་ངག /Keyboard/Key tips - + Input settings ནང་འཇུག་གི་སྒྲིག་བཀོད། /Keyboard/Input settings @@ -3225,81 +3236,80 @@ change system settings རྒྱུན་ལྡན་གྱི་གནས་ - - + + Maximize ཚད་གཞི་མཐོ་ཤོས་ཀྱི་སྒོ་ནས - - - - + + + + Settings སྒྲིག་བཀོད། - Search - འཚོལ་ཞིབ། + འཚོལ་ཞིབ། Main menu ཟས་ཐོ་གཙོ་བོ། - + Restore སླར་གསོ་བྱེད་པ། - + Option འདེམས་ཚན་ - + Minimize ཉུང་དུ་གཏོང་གང་ཐུབ་བྱ་དགོས། - + Close སྒོ་རྒྱག་པ། - + Help རོགས་རམ་བྱེད་པ། - + About འབྲེལ་ཡོད་ཀྱི་སྐོར། - + Exit ཕྱིར་འཐེན་བྱེད་པ། - + Version: པར་གཞི་འདི་ལྟ་སྟེ།: - + Specified གཏན་འབེབས་བྱས་པ། - + Warning ཐ་ཚིག་སྒྲོག་པ། - + This function has been controlled འགན་ནུས་འདི་ཚོད་འཛིན་བྱས་ཟིན། @@ -4524,7 +4534,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག ཟླ་བ་བཅུ་གཉིས་ - + min length %1 @@ -4532,7 +4542,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + min digit num %1 @@ -4540,7 +4550,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + min upper num %1 @@ -4548,7 +4558,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + min lower num %1 @@ -4556,7 +4566,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + min other num %1 @@ -4564,7 +4574,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + min char class %1 @@ -4572,7 +4582,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + max repeat %1 @@ -4580,7 +4590,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + max class repeat %1 @@ -4588,7 +4598,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག - + max sequence %1 @@ -4606,7 +4616,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས་ནི་དབང་པོ་སྐྱོན་ཅན་ཡིན། - + ukui-control-center ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས། @@ -5113,11 +5123,11 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག SearchWidget - - - - - + + + + + No search results འཚོལ་ཞིབ་བྱས་འབྲས་མེད་པ། @@ -5323,7 +5333,7 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག བསུབ་པ། - + or ཡང་ན་དེ་ལྟར་ @@ -5496,111 +5506,111 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག དེ་མིན། - - + + Set གཏན་འཁེལ་བྱ་དགོས། - + Wallpaper གྱང་ཤོག - + Beep སྦྲང་མ། - + Blue-Crystal ཁ་དོག་སྔོན་པོའི་ཆུ་ཤེལ་ - - + + Light-Seeking འོད་ཟེར་འཚོལ་བ། - + DMZ-Black DMZ-ནག་པོ - + DMZ-White DMZ-མི་དཀར - + Dark-Sense མུན་ནག་གི་ཚོར་སྣང་། - - - + + + basic གཞི་རྩའི་ཆ་ནས - + Classic གནའ་གཞུང་། - + classic གནའ་གཞུང་། - + HeYin ཧའེ་དབྱིན། - + hp hp - + ukui ཝུའུ་ཁི་ལན་གྱིས་བཤད་རྒྱུར - + daybreakBlue ཉི་མ་ཤར་བའི་པུའུ་ལའེ་ - + jamPurple ཤིང་ཏོག་བསྣུར་མ། - + magenta མེ་དམར། - + sunRed ཉི་མ་ཤར་བ། - + sunsetOrange ཉི་མ་ནུབ་པའི་ཨོ་ལན་ཀེ་ལན། - + dustGold གད་སྙིགས་བླུགས་སྣ་ཚོགས། - + polarGreen གླིང་སྣེའི་ཀེ་ལིན། @@ -5640,27 +5650,27 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག TimeZoneChooser - + Cancel ཕྱིར་འཐེན། - + Confirm གཏན་འཁེལ་བྱ་དགོས། - + Change Timezone དུས་ཚོད་བསྒྱུར་བཅོས་བྱ་དགོས། - + Search Timezone དུས་ཚོད་འཚོལ་ཞིབ་བྱེད་པའི་དུས་ - + To select a time zone, please click where near you on the map and select a city from the nearest city དུས་ཚོད་ཀྱི་ས་ཁོངས་འདེམས་དགོས་ན། ས་བཀྲའི་སྟེང་གི་ཉེ་འདབས་ཀྱི་ས་ཆ་གང་དུ་སོང་ནས་ཆེས་ཉེ་བའི་གྲོང་ཁྱེར་ནས་གྲོང་ཁྱེར་ཞིག་འདེམས་རོགས། @@ -6131,28 +6141,49 @@ II.Javaལག་རྩལ་གྱི་ཚད་བཀག རྒྱང་རིང་གི་ཅོག་ཙེ། - Allow others to view your desktop - མི་གཞན་གྱིས་ཁྱོད་ཀྱི་ཅོག་ཙེའི་སྟེང་གི་ཅོག་ཙེ + མི་གཞན་གྱིས་ཁྱོད་ཀྱི་ཅོག་ཙེའི་སྟེང་གི་ཅོག་ཙེ - + + Connect to your desktop remotely + རྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་ + + + + Allow others to connect to your desktop remotely using RDP + མི་གཞན་ལ་བཀོལ་ཆོག་RDPརྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་། + /Vino/Allow others to connect to your desktop remotely using RDP + + + + Allow others to connect to your desktop remotely using VNC + མི་གཞན་ལ་སྤྱོད་ཆོག་VNCརྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་། + /Vino/Allow others to connect to your desktop remotely using VNC + + + Allow connection to control screen འབྲེལ་མཐུད་བྱས་ནས་བརྙན་ཤེལ་ཚོད་འཛིན་བྱེད་དུ /Vino/Allow connection to control screen - + You must confirm every visit for this machine ཁྱེད་ཚོས་ངེས་པར་དུ་འཕྲུལ་ཆས་འདིའི་འཚམས་འདྲི་ཚང་མ་གཏན་འཁེལ /Vino/You must confirm every visit for this machine - + Require user to enter this password: སྤྱོད་མཁན་གྱིས་གསང་གྲངས་འདིའི་ནང་དུ་འཇུག་དགོས་པའི་བླང་བྱ་ /Vino/Require user to enter this password: + + + Edit + རྩོམ་སྒྲིག + Vpn @@ -6741,7 +6772,7 @@ Common reasons are that the overall screen size is too big, or you enabled more - + Cancel ཕྱིར་འཐེན། @@ -6751,42 +6782,42 @@ Common reasons are that the overall screen size is too big, or you enabled more ཉར་ཚགས། - + Confirm གཏན་འཁེལ་བྱ་དགོས། - - - + + + Tips གསལ་འདེབས་བྱེད་ཐབས། - - + + Invalid Id! གོ་མི་ཆོད་པའི་ཐོབ་ཐང་ལག་ཁྱེར་ - - - + + + OK འགྲིགས། - + Invalid Group Name! གོ་མི་ཆོད་པའི་ཚོགས་པའི་མིང་། - + Whether delete the group: “%1” ? ཚོ་ཆུང་དེ་བསུབ་ཡོད་མེད་ལ་མ་བལྟོས་པར་"%1"ཡིན་ནམ། - + which will make some file components in the file system invalid! དེས་ཡིག་ཆའི་མ་ལག་ཁྲོད་ཀྱི་ཡིག་ཆའི་ལྷུ་ལག་ཁ་ཤས་གོ་མི་ཆོད་པར་འགྱུར་སྲིད། diff --git a/shell/res/i18n/en_US.ts b/shell/res/i18n/en_US.ts index 3910ff4..0019175 100644 --- a/shell/res/i18n/en_US.ts +++ b/shell/res/i18n/en_US.ts @@ -14,22 +14,22 @@ - + Version - + Disk - + Status - + Serial @@ -72,39 +72,49 @@ - + Extend + + + Kylin Linux Desktop (Touch Screen) V10 (SP1) + + + Kylin Linux Desktop (Tablet) V10 (SP1) + + + + Kylin Linux Desktop V10 (SP1) - - + + avaliable - - + + expired - + The system needs to be restarted to set the HostName, whether to reboot - + Reboot Now - + Reboot Later @@ -263,7 +273,13 @@ /About/Status - + + Active + + /About/Active + + + Serial @@ -279,7 +295,7 @@ AddButton - + Add @@ -647,7 +663,7 @@ Autoboot Settings - /autoboot/Autoboot Settings + /Autoboot/Autoboot Settings @@ -1256,14 +1272,19 @@ you can restore them to ensure the integrity of your system. - Current Pwd - + + + Required + + + + New Pwd @@ -1271,7 +1292,6 @@ you can restore them to ensure the integrity of your system. - Sure Pwd @@ -1421,31 +1441,32 @@ you can restore them to ensure the integrity of your system. - 选择自定义颜色 + + Choose a custom color - + HEX - + RGB - + Cancel - + OK - + Custom color @@ -2545,45 +2566,45 @@ change system settings /Keyboard/Delay - + Short - + Long - + Speed /Keyboard/Speed - + Slow - + Fast - + Input test /Keyboard/Input test - + Key tips /Keyboard/Key tips - + Input settings /Keyboard/Input settings @@ -2611,71 +2632,71 @@ change system settings - + This function has been controlled - Normal + Restore - + Maximize - - - - + + + + Settings - + Option - + Minimize - + Close - + Help - + About - + Exit - + Version: - + Specified - + Warning @@ -2938,7 +2959,7 @@ change system settings Notice - + Notice @@ -3097,13 +3118,13 @@ change system settings + auto - - + %1 Hz @@ -3434,63 +3455,63 @@ Fax: - + min length %1 - + min digit num %1 - + min upper num %1 - + min lower num %1 - + min other num %1 - + min char class %1 - + max repeat %1 - + max class repeat %1 - + max sequence %1 @@ -3869,11 +3890,11 @@ Fax: SearchWidget - - + - + + No search results @@ -4034,7 +4055,7 @@ Fax: - + or @@ -4199,111 +4220,111 @@ Fax: - - + + Set - + Wallpaper - + Beep - + Blue-Crystal - - + + Light-Seeking - + DMZ-Black - + DMZ-White - + Dark-Sense - - - + + + basic - + classic - + Classic - + HeYin - + hp - + ukui - + daybreakBlue - + jamPurple - + magenta - + sunRed - + sunsetOrange - + dustGold - + polarGreen @@ -4339,27 +4360,27 @@ Fax: TimeZoneChooser - + Cancel - + Confirm - + Change Timezone - + Search Timezone - + To select a time zone, please click where near you on the map and select a city from the nearest city @@ -4760,27 +4781,44 @@ Fax: - Allow others to view your desktop + Connect to your desktop remotely - + + Allow others to connect to your desktop remotely using RDP + + /Vino/Allow others to connect to your desktop remotely using RDP + + + + Allow others to connect to your desktop remotely using VNC + + /Vino/Allow others to connect to your desktop remotely using VNC + + + Allow connection to control screen /Vino/Allow connection to control screen - + You must confirm every visit for this machine /Vino/You must confirm every visit for this machine - + Require user to enter this password: /Vino/Require user to enter this password: + + + Edit + + Wallpaper @@ -4934,7 +4972,7 @@ Fax: - + Custom Time @@ -4985,7 +5023,7 @@ Fax: - + Splice Screen @@ -5057,19 +5095,19 @@ Fax: - + The zoom has been modified, it will take effect after you log off - + Log out now - + Later @@ -5080,79 +5118,79 @@ Fax: - - - - - + + + + + Warning - - - + + + please insure at least one output! - - + + Sorry, your configuration could not be applied. Common reasons are that the overall screen size is too big, or you enabled more displays than supported by your GPU. - + All Day - + Follow the sunrise and sunset - - - + + + Brightness /Display/Brightness - + Splicing Method - + Change - + monitor /display/monitor - + as main - + screen zoom /display/screen zoom - + open monitor @@ -5189,12 +5227,12 @@ Common reasons are that the overall screen size is too big, or you enabled more - + Open time should be earlier than close time! - + Warnning @@ -5223,7 +5261,7 @@ Common reasons are that the overall screen size is too big, or you enabled more - + Cancel @@ -5233,42 +5271,42 @@ Common reasons are that the overall screen size is too big, or you enabled more - - - + + + Tips - - + + Invalid Id! - - - + + + OK - + Invalid Group Name! - + Whether delete the group: “%1” ? - + which will make some file components in the file system invalid! - + Confirm diff --git a/shell/res/i18n/zh_CN.ts b/shell/res/i18n/zh_CN.ts index ce0b5f2..5e9f366 100644 --- a/shell/res/i18n/zh_CN.ts +++ b/shell/res/i18n/zh_CN.ts @@ -494,7 +494,13 @@ /About/Status - + + Active + 激活 + /About/Active + + + Serial 序列号 @@ -592,7 +598,7 @@ AddButton - + Add 添加 @@ -1380,7 +1386,7 @@ Autoboot Settings 开机启动设置 - /autoboot/Autoboot Settings + /Autoboot/Autoboot Settings @@ -3044,8 +3050,9 @@ Please authenticate yourself to continue - 选择自定义颜色 - + + Choose a custom color + 选择自定义颜色 @@ -3068,7 +3075,7 @@ Please authenticate yourself to continue 确定 - + Custom color 自定颜色 @@ -5899,45 +5906,45 @@ folder will be deleted! /Keyboard/Delay - + Short - + Long - + Speed 速度 /Keyboard/Speed - + Slow - + Fast - + Input test 输入测试 /Keyboard/Input test - + Key tips 按键提示 /Keyboard/Key tips - + Input settings 输入法设置 /Keyboard/Input settings @@ -6418,29 +6425,28 @@ Please retry or relogin! MainWindow - Search - 搜索 + 搜索 UKCC 设置 - - - - + + + + Settings 设置 - + Option 选项 - + Minimize 最小化 @@ -6454,43 +6460,43 @@ Please retry or relogin! 警告 - + Restore 还原 - - + + Maximize 最大化 - + Close 关闭 - + Help 帮助 - + About 关于 - + Exit 退出 - + Version: 版本: - + Specified 指定插件 @@ -6499,13 +6505,13 @@ Please retry or relogin! 控制面板 - + Warning 警告 - + This function has been controlled 该功能已被管控 @@ -9746,7 +9752,7 @@ E-mail: support@kylinos.cn - + ukui-control-center 设置 @@ -9892,63 +9898,63 @@ E-mail: support@kylinos.cn 连接失败,尝试重新连接 - + min length %1 - + min digit num %1 - + min upper num %1 - + min lower num %1 - + min other num %1 - + min char class %1 - + max repeat %1 - + max class repeat %1 - + max sequence %1 @@ -10736,11 +10742,11 @@ E-mail: support@kylinos.cn 触控板 - - - - - + + + + + No search results 无搜索结果 @@ -11094,7 +11100,7 @@ E-mail: support@kylinos.cn 删除 - + or @@ -11645,56 +11651,56 @@ E-mail: support@kylinos.cn 相关设置 - - + + Set 去设置 - + Wallpaper 桌面壁纸 - + Beep 提示音 - + Blue-Crystal 典蓝 - - + + Light-Seeking - + DMZ-Black DMZ-黑 - + DMZ-White 印白 - + Dark-Sense 耀黑 - - - + + + basic 基础 - + Classic @@ -11707,57 +11713,57 @@ E-mail: support@kylinos.cn 时尚 - + hp 惠普 - + ukui 寻光 - + HeYin - + classic 经典 - + daybreakBlue 蓝色 - + jamPurple 紫色 - + magenta 玫红色 - + sunRed 红色 - + sunsetOrange 橙色 - + dustGold 黄色 - + polarGreen 绿色 @@ -11867,12 +11873,12 @@ E-mail: support@kylinos.cn TimeZoneChooser - + Cancel 取消 - + Confirm 确定 @@ -11881,7 +11887,7 @@ E-mail: support@kylinos.cn 更改时区 - + Search Timezone 搜索时区 @@ -11890,7 +11896,7 @@ E-mail: support@kylinos.cn 搜索时区 - + To select a time zone, please click where near you on the map and select a city from the nearest city 若要选择时区,请点击地图上靠近你所在的位置,从最接近的城市中选取一个城市 @@ -11903,7 +11909,7 @@ E-mail: support@kylinos.cn 更改时区 - + Change Timezone 更改时区 @@ -12858,28 +12864,49 @@ E-mail: support@kylinos.cn 远程桌面 - Allow others to view your desktop - 允许其他人远程连接您的桌面 + 允许其他人远程连接您的桌面 - + + Connect to your desktop remotely + 远程连接你的桌面 + + + + Allow others to connect to your desktop remotely using RDP + 允许其他人使用RDP远程连接你的桌面 + /Vino/Allow others to connect to your desktop remotely using RDP + + + + Allow others to connect to your desktop remotely using VNC + 允许其他人使用VNC远程连接你的桌面 + /Vino/Allow others to connect to your desktop remotely using VNC + + + Allow connection to control screen 允许其他人远程连接您的桌面并控制您的屏幕 /Vino/Allow connection to control screen - + You must confirm every visit for this machine 您必须为本机机器确认每次访问 /Vino/You must confirm every visit for this machine - + Require user to enter this password: 要求用户输入此密码: /Vino/Require user to enter this password: + + + Edit + 编辑 + Vpn @@ -13700,7 +13727,7 @@ Common reasons are that the overall screen size is too big, or you enabled more - + Cancel 取消 @@ -13710,42 +13737,42 @@ Common reasons are that the overall screen size is too big, or you enabled more 保存 - + Confirm 确定 - - - + + + Tips 提示 - - + + Invalid Id! 无效组ID! - - - + + + OK 确定 - + Invalid Group Name! 无效组名! - + Whether delete the group: “%1” ? 是否删除用户组:“%1”? - + which will make some file components in the file system invalid! 这将使得文件系统中的某些文件组建ID无效! diff --git a/shell/searchwidget.cpp b/shell/searchwidget.cpp index cb8961e..71940c8 100644 --- a/shell/searchwidget.cpp +++ b/shell/searchwidget.cpp @@ -61,6 +61,7 @@ SearchWidget::SearchWidget(QWidget *parent) QString retValue = text(); if (popup->model()->rowCount() == 0) { + Common::buriedSettings(QString("SearchWidget"), nullptr, QString("No search results"), retValue); if (m_model->data(m_model->index(m_model->rowCount() - 1, 0)) != tr("No search results")) m_model->appendRow(new QStandardItem(tr("No search results"))); m_model->setData(m_model->index(m_model->rowCount() - 1, 0), text(), Qt::UserRole); @@ -70,6 +71,7 @@ SearchWidget::SearchWidget(QWidget *parent) if (!m_bIsChinese) m_completer->setCompletionRole(Qt::DisplayRole); if (m_model->data(m_model->index(m_model->rowCount() - 1, 0)) == tr("No search results")) { + Common::buriedSettings(QString("SearchWidget"), nullptr, QString("No search results"), retValue); while (m_model->data(m_model->index(m_model->rowCount() - 1, 0)) == tr("No search results")) { m_model->clearItemData(m_model->index(m_model->rowCount() - 1, 0)); m_model->removeRow(m_model->rowCount() - 1); @@ -157,7 +159,7 @@ bool SearchWidget::jumpContentPathWidget(QString path) { bResult = true; // 埋点搜索插件 - Common::buriedSettings(m_EnterNewPagelist[i].fullPagePath, nullptr, QString("search")); + Common::buriedSettings(QString("SearchWidget"), nullptr, QString("search"), m_EnterNewPagelist[i].fullPagePath); break; }