Skip to content

Commit ed2eefc

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: update building warning.
as title. Log:
1 parent d9378b1 commit ed2eefc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+123
-40
lines changed

applets/dde-am/amapplet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ static QString unescapeAppIdFromObjectPath(const QString &path)
5757

5858
void AMApplet::onInterfacesRemoved(const QDBusObjectPath &objPath, const QStringList &interfaces)
5959
{
60+
Q_UNUSED(interfaces)
6061
const QString &path(objPath.path());
6162
qDebug() << "InterfacesRemoved by AM, path:" << path;
6263

applets/dde-appearance/appearanceapplet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ AppearanceApplet::AppearanceApplet(QObject *parent)
2121
watcher->addWatchedService("org.deepin.dde.Appearance1");
2222
watcher->setConnection(QDBusConnection::sessionBus());
2323
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, [this] (const QString & service) {
24+
Q_UNUSED(service)
2425
initDBusProxy();
2526
});
2627
}

applets/dde-apps/amappitem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ static const QString DEFAULT_KEY = "default";
1919
static QString locale = QLocale::system().name();
2020

2121
AMAppItem::AMAppItem(const QDBusObjectPath &path, QObject *parent)
22-
: AppItem(DUtil::unescapeFromObjectPath(path.path().split('/').last()), AppItemModel::AppItemType)
23-
, Application(AM_DBUS_SERVICE, path.path(), QDBusConnection::sessionBus(), parent)
22+
: Application(AM_DBUS_SERVICE, path.path(), QDBusConnection::sessionBus(), parent)
23+
, AppItem(DUtil::unescapeFromObjectPath(path.path().split('/').last()), AppItemModel::AppItemType)
2424
{
2525
}
2626

applets/dde-apps/amappitemmodel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ AMAppItemModel::AMAppItemModel(QObject *parent)
3939
});
4040

4141
connect(m_manager, &ObjectManager::InterfacesRemoved, this, [this](const QDBusObjectPath &objPath, const QStringList &interfaces) {
42+
Q_UNUSED(interfaces)
4243
auto desktopId = DUtil::unescapeFromObjectPath(objPath.path().split('/').last());
4344
auto res = match(index(0, 0), AppItemModel::DesktopIdRole, desktopId);
4445
if (res.isEmpty()) {

applets/dde-apps/appgroupmanager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace apps {
1515
AppGroupManager::AppGroupManager(AMAppItemModel * referenceModel, QObject *parent)
1616
: QStandardItemModel(parent)
1717
, m_referenceModel(referenceModel)
18-
, m_config(Dtk::Core::DConfig::create("org.deepin.dde.shell", "org.deepin.ds.dde-apps", "", this))
1918
, m_dumpTimer(new QTimer(this))
19+
, m_config(Dtk::Core::DConfig::create("org.deepin.dde.shell", "org.deepin.ds.dde-apps", "", this))
2020
{
2121
m_dumpTimer->setSingleShot(true);
2222
m_dumpTimer->setInterval(1000);
@@ -295,7 +295,6 @@ void AppGroupManager::launchpadArrangementConfigMigration()
295295
itemArrangementSettings.beginGroup(groupName);
296296
QString folderName = itemArrangementSettings.value("name", QString()).toString();
297297
int pageCount = itemArrangementSettings.value("pageCount", 0).toInt();
298-
bool isTopLevel = groupName == "toplevel";
299298

300299
QVariantMap valueMap;
301300
valueMap.insert("name", folderName);
@@ -344,7 +343,7 @@ void AppGroupManager::loadAppGroupInfo()
344343
if (groupId.isEmpty()) {
345344
groupId = assignGroupId();
346345
}
347-
auto p = appendGroup(groupId, name, items);
346+
appendGroup(groupId, name, items);
348347
}
349348

350349
// always ensure top-level group exists

applets/dde-apps/appsdockedhelper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ AppsDockedHelper::AppsDockedHelper(QObject *parent)
3434
YAML::Node node;
3535
try {
3636
node = YAML::Load("{" + dcokedDesktopFilesStr.toStdString() + "}");
37-
} catch (YAML::Exception) {
37+
} catch (const YAML::Exception&) {
3838
qWarning() << "unable to parse docked desktopfiles";
3939
}
4040

@@ -66,6 +66,8 @@ bool AppsDockedHelper::isDocked(const QString &appItemId) const
6666

6767
void AppsDockedHelper::setDocked(const QString &appId, bool docked)
6868
{
69+
Q_UNUSED(appId)
70+
Q_UNUSED(docked)
6971
// TODO
7072
}
7173
}

frame/appletdata.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ DAppletData::DAppletData(const QVariantMap &data)
2929
}
3030

3131
DAppletData::DAppletData(const DAppletData &other)
32-
: d(other.d)
32+
: QObject()
33+
, d(other.d)
3334
{
3435
}
3536

frame/layershell/dlayershellwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ DLayerShellWindow::DLayerShellWindow(QWindow* window)
212212
waylandWindow->setShellIntegration(shellIntegration);
213213
}
214214
#ifdef BUILD_WITH_X11
215-
else if (auto xcbWindow = dynamic_cast<QNativeInterface::Private::QXcbWindow*>(window->handle())) {
215+
else if (dynamic_cast<QNativeInterface::Private::QXcbWindow*>(window->handle())) {
216216
new LayerShellEmulation(window, this);
217217
qCInfo(layershellwindow) << "not a wayland window, try to emulate on x11";
218218
}

frame/layershell/x11dlayershellemulation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ LayerShellEmulation::LayerShellEmulation(QWindow* window, QObject *parent)
5959
});
6060
connect(qApp, &QGuiApplication::primaryScreenChanged, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
6161
connect(m_window, &QWindow::screenChanged, this, [this](QScreen *nowScreen){
62+
Q_UNUSED(nowScreen)
6263
onPositionChanged();
6364
m_exclusionZoneChangedTimer.start();
6465
});

frame/models/listtotableproxymodel.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ ListToTableProxyModel::ListToTableProxyModel(QObject *parent)
2525
});
2626

2727
connect(this, &ListToTableProxyModel::dataChanged, this,
28-
[this](const QModelIndex &topLeft, const QModelIndex &bottomRight,
29-
const QList<int> &roles = QList<int>()){
28+
[this](const QModelIndex &, const QModelIndex &,
29+
const QList<int> &){
3030
// TODO: lazy solution, we should use dataChanged() to notify extra column changed;
3131
beginResetModel();
3232
endResetModel();
@@ -35,6 +35,7 @@ ListToTableProxyModel::ListToTableProxyModel(QObject *parent)
3535

3636
QVariant ListToTableProxyModel::extraColumnData(const QModelIndex &parent, int row, int extraColumn, int role) const
3737
{
38+
Q_UNUSED(role)
3839
QVariant result(data(index(row, m_sourceColumn, parent), m_roles[extraColumn]));
3940
if (!result.isValid()) return QStringLiteral("<invalid>");
4041
return result.userType() == QMetaType::QVariantList ? result.toStringList().join(',') : result;

0 commit comments

Comments
 (0)