Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deepin-devicemanager-server/customgpuinfo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ bool getGpuMemInfoForFTDTM(QMap<QString, QString> &mapInfo)
int main(int argc, char *argv[])
{
QMap<QString, QString> mapInfo;
if (getGpuBaseInfo(mapInfo) && getGpuMemInfoForFTDTM(mapInfo)) {
if (getGpuBaseInfo(mapInfo)) {
getGpuMemInfoForFTDTM(mapInfo);
for (auto it = mapInfo.begin(); it != mapInfo.end(); ++it)
std::cout << it.key().toStdString() << ": " << it.value().toStdString() << std::endl;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

using namespace DDLog;

QStringList DeviceInput::m_supportInterfaces= {"PS/2", "Bluetooth", "I2C"};
QStringList DeviceInput::m_supportInterfaces= {"PS/2", "Bluetooth", "I2C", "USB"};

DeviceInput::DeviceInput()
: DeviceBaseInfo()
Expand Down
5 changes: 4 additions & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,10 @@ void DeviceManager::deleteDisableDuplicate_AudioDevice(void)
continue;
}
m_ListDeviceAudio.push_back(enabledDevices.value(it));

qDebug() << enabledDevices.value(it)->name() << "is enable: " << enabledDevices.value(it)->enable();
if (enabledDevices.value(it)->enable()){
continue;
}
setAudioDeviceEnable(enabledDevices.value(it), enabledDevices.value(it)->enable());
}
qWarning()<<"delete after: "<< m_ListDeviceAudio.size();
Expand Down
4 changes: 1 addition & 3 deletions deepin-devicemanager/src/GenerateDevice/CmdTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,7 @@ void CmdTool::getMulHwinfoInfo(const QString &info)
}
QMap<QString, QString> mapInfo;
getMapInfoFromHwinfo(item, mapInfo);
if (mapInfo["Hardware Class"] == "sound"
|| (mapInfo["Device"].contains("USB Audio") && mapInfo["Device"].contains("snd-usb-audio"))
|| mapInfo["Driver"].contains("snd-usb-audio")) {
if (mapInfo["Hardware Class"] == "sound" || (mapInfo["Device"].contains("USB Audio") && mapInfo["Device"].contains("snd-usb-audio"))) {
qCDebug(appLog) << "Found sound device.";
// mapInfo["Device"].contains("USB Audio") 是为了处理未识别的USB声卡 Bug-118773
addMapInfo("hwinfo_sound", mapInfo);
Expand Down
8 changes: 5 additions & 3 deletions deepin-devicemanager/src/Page/PageDriverControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
using namespace PolkitQt1;
using namespace DDLog;

PageDriverControl::PageDriverControl(QWidget *parent, QString operation, bool install, QString deviceName, QString driverName, QString printerVendor, QString printerModel)
PageDriverControl::PageDriverControl(QWidget *parent, const QString &operation, bool install,
const QString &deviceName, const QString &driverName,
const QString &printerVendor, const QString &printerModel)
: DDialog(parent)
, mp_stackWidget(new DStackedWidget)
, m_Install(install)
Expand Down Expand Up @@ -168,14 +170,14 @@ void PageDriverControl::slotBtnNext()
}
}

void PageDriverControl::slotProcessChange(qint32 value, QString detail)
void PageDriverControl::slotProcessChange(qint32 value, const QString &detail)
{
qCDebug(appLog) << "PageDriverControl::slotProcessChange, value:" << value << "detail:" << detail;
Q_UNUSED(detail)
mp_WaitDialog->setValue(value);
}

void PageDriverControl::slotProcessEnd(bool sucess, QString errCode)
void PageDriverControl::slotProcessEnd(bool sucess, const QString &errCode)
{
qCDebug(appLog) << "Process ended, success:" << sucess << "error:" << errCode;
QString successStr = m_Install ? tr("Update successful") : tr("Uninstallation successful");
Expand Down
9 changes: 5 additions & 4 deletions deepin-devicemanager/src/Page/PageDriverControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class PageDriverControl : public DDialog
* @param install 标识卸载还是更新
* @param parent
*/
PageDriverControl(QWidget *parent, QString operation, bool install,
QString deviceName, QString driverName, QString printerVendor = "", QString printerModel = "");
PageDriverControl(QWidget *parent, const QString &operation, bool install,
const QString &deviceName, const QString &driverName,
const QString &printerVendor = "", const QString &printerModel = "");

/**
* @brief hasWidgetIsVisible 有驱动界面显示
Expand Down Expand Up @@ -68,13 +69,13 @@ private slots:
* @param value 当前进度 0 ~ 100
* @param detail 当前处理的详细信息
*/
void slotProcessChange(qint32 value, QString detail);
void slotProcessChange(qint32 value, const QString &detail);

/**
* @brief slotProcessEnd 更新处理结束的信号
* @param sucess 更新是否成功
*/
void slotProcessEnd(bool sucess, QString errCode);
void slotProcessEnd(bool sucess, const QString &errCode);

/**
* @brief slotClose
Expand Down
10 changes: 7 additions & 3 deletions deepin-devicemanager/src/Page/PageDriverManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ void PageDriverManager::scanDriverInfo()
void PageDriverManager::slotDriverOperationClicked(int index, int itemIndex, DriverOperationItem::Mode mode)
{
qCDebug(appLog) << "PageDriverManager::slotDriverOperationClicked, index:" << index << "itemIndex:" << itemIndex << "mode:" << mode;
Q_UNUSED(itemIndex)

mp_DriverInstallInfoPage->headWidget()->setReDetectEnable(false);
mp_DriverBackupInfoPage->headWidget()->setReDetectEnable(false);
mp_DriverRestoreInfoPage->headWidget()->setReDetectEnable(false);
Expand Down Expand Up @@ -555,7 +557,7 @@ void PageDriverManager::slotListViewWidgetItemClicked(const QString &itemStr)
void PageDriverManager::slotBackupProgressChanged(int progress)
{
qCDebug(appLog) << "PageDriverManager::slotBackupProgressChanged, progress:" << progress;

Q_UNUSED(progress)
}

void PageDriverManager::slotBackupFinished(bool bsuccess)
Expand Down Expand Up @@ -616,9 +618,10 @@ void PageDriverManager::slotBackupFinished(bool bsuccess)
}
}

void PageDriverManager::slotRestoreProgress(int progress, QString strDeatils)
void PageDriverManager::slotRestoreProgress(int progress, const QString &strDeatils)
{
qCDebug(appLog) << "PageDriverManager::slotRestoreProgress, progress:" << progress << "details:" << strDeatils;
Q_UNUSED(strDeatils)
if(mp_CurRestoreDriverInfo == nullptr) {
qCWarning(appLog) << "Current restore driver info is null, returning.";
return;
Expand All @@ -632,9 +635,10 @@ void PageDriverManager::slotRestoreProgress(int progress, QString strDeatils)
}
}

void PageDriverManager::slotRestoreFinished(bool success, QString msg)
void PageDriverManager::slotRestoreFinished(bool success, const QString &msg)
{
qCDebug(appLog) << "PageDriverManager::slotRestoreFinished, success:" << success << "msg:" << msg;
Q_UNUSED(msg)
int index = -1;
if (mp_CurRestoreDriverInfo) {
index = m_ListDriverInfo.indexOf(mp_CurRestoreDriverInfo);
Expand Down
4 changes: 2 additions & 2 deletions deepin-devicemanager/src/Page/PageDriverManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ private slots:
/**
* @brief slotRestoreProgress 还原进度刷新
*/
void slotRestoreProgress(int progress, QString strDeatils);
void slotRestoreProgress(int progress, const QString &strDeatils);

/**
* @brief slotRestoreFinished 还原结束
*/
void slotRestoreFinished(bool success, QString msg);
void slotRestoreFinished(bool success, const QString &msg);

signals:
void startScanning();
Expand Down
3 changes: 3 additions & 0 deletions deepin-devicemanager/src/Page/PageDriverRestoreInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ void PageDriverRestoreInfo::setItemOperationEnable(int index, bool enable)
void PageDriverRestoreInfo::slotOperatorClicked(int index, int itemIndex, DriverOperationItem::Mode mode)
{
qCDebug(appLog) << "Operator clicked, index:" << index << "itemIndex:" << itemIndex << "mode:" << mode;
Q_UNUSED(index)
Q_UNUSED(mode)

PageDriverTableView *view = mp_ViewBackable;
// 设置状态
DriverStatusItem *statusItem = new DriverStatusItem(this, ST_DRIVER_RESTORING);
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/Page/PageListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void PageListView::clear()
mp_ListView->clearItem();
}

void PageListView::setCurType(QString type)
void PageListView::setCurType(const QString &type)
{
qCDebug(appLog) << "PageListView::setCurType, type:" << type;
m_CurType = type;
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/Page/PageListView.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PageListView : public DWidget
*/
void clear();

void setCurType(QString type);
void setCurType(const QString &type);

protected:
/**@brief:事件重写*/
Expand Down