fix bug 146541

This commit is contained in:
jzxc95 2022-11-01 11:16:10 +08:00
parent 1cf2aeb8ca
commit 240d154240
1 changed files with 27 additions and 27 deletions

View File

@ -168,19 +168,19 @@ void MainWindow::secondaryStart()
*/ */
void MainWindow::initPlatform() void MainWindow::initPlatform()
{ {
char* projectName = kdk_system_get_projectName(); // char* projectName = kdk_system_get_projectName();
QString strProjectName(projectName); // QString strProjectName(projectName);
free(projectName); // free(projectName);
projectName = NULL; // projectName = NULL;
if(v10Sp1.compare(strProjectName,Qt::CaseInsensitive) == 0) { // if(v10Sp1.compare(strProjectName,Qt::CaseInsensitive) == 0) {
unsigned int feature = kdk_system_get_productFeatures(); // unsigned int feature = kdk_system_get_productFeatures();
if (feature == 3) { // if (feature == 3) {
m_isShowInCenter = true; // m_isShowInCenter = true;
} // }
} else if (intel.compare(strProjectName,Qt::CaseInsensitive) == 0) { // } else if (intel.compare(strProjectName,Qt::CaseInsensitive) == 0) {
m_isShowInCenter = true; // m_isShowInCenter = true;
} // }
qDebug() << "projectName" << projectName << m_isShowInCenter; // qDebug() << "projectName" << projectName << m_isShowInCenter;
} }
/** /**
@ -531,20 +531,20 @@ void MainWindow::setCentralWidgetType(IconActiveType iconStatus)
void MainWindow::getTabletMode() void MainWindow::getTabletMode()
{ {
QDBusInterface interface(QString("com.kylin.statusmanager.interface"), // QDBusInterface interface(QString("com.kylin.statusmanager.interface"),
QString("/"), // QString("/"),
QString("com.kylin.statusmanager.interface"), // QString("com.kylin.statusmanager.interface"),
QDBusConnection::sessionBus()); // QDBusConnection::sessionBus());
if(!interface.isValid()) { // if(!interface.isValid()) {
m_isShowInCenter = true; // m_isShowInCenter = true;
return; // return;
} // }
QDBusReply<bool> reply = interface.call("get_current_tabletmode"); // QDBusReply<bool> reply = interface.call("get_current_tabletmode");
if (!reply.isValid()) { // if (!reply.isValid()) {
m_isShowInCenter = true; // m_isShowInCenter = true;
return; // return;
} // }
m_isShowInCenter = reply.value(); // m_isShowInCenter = reply.value();
} }
/** /**