Skip to content

Commit

Permalink
Merge pull request #56 from sailfishos/remove_ssu_lib
Browse files Browse the repository at this point in the history
[crash-reporter] Replace ssu library dependency with systemsettings. JB#57126
  • Loading branch information
pvuorela committed Mar 28, 2024
2 parents 7879975 + 743b7e3 commit 8ea96e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rpm/crash-reporter.spec
Expand Up @@ -9,14 +9,14 @@ BuildRequires: qt5-qtdeclarative-devel
BuildRequires: qt5-qtgui-devel
BuildRequires: qt5-qtnetwork-devel
BuildRequires: qt5-qttools-linguist
BuildRequires: ssu-devel
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libiphb)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(mce)
BuildRequires: pkgconfig(qt5-boostable)
BuildRequires: pkgconfig(nemonotifications-qt5)
BuildRequires: pkgconfig(systemsettings)
BuildRequires: pkgconfig(usb-moded-qt5)
BuildRequires: pkgconfig(systemd)
BuildRequires: oneshot
Expand Down
9 changes: 3 additions & 6 deletions src/libs/libs.pro
Expand Up @@ -35,13 +35,12 @@ QT = \

CONFIG += link_pkgconfig
PKGCONFIG += mce \
usb-moded-qt5
usb-moded-qt5 \
nemonotifications-qt5 \
systemsettings

DEFINES += CREPORTER_EXPORTS

CONFIG += link_pkgconfig
PKGCONFIG += nemonotifications-qt5

message(Building architecture: $$system(uname -m))

# Enable Qt Bearer Management API.
Expand Down Expand Up @@ -110,8 +109,6 @@ HEADERS += $$PUBLIC_HEADERS \
settings/creportersettingsbase_p.h \
settings/creportersettingsinit_p.h \

LIBS += -lssu

TARGET = $$qtLibraryTarget(crashreporter)

target.path += $$[QT_INSTALL_LIBS]
Expand Down
6 changes: 3 additions & 3 deletions src/libs/utils/creporterutils.cpp
Expand Up @@ -29,7 +29,7 @@
#include <sys/stat.h>

#ifndef CREPORTER_UNIT_TEST
#include <ssudeviceinfo.h>
#include <deviceinfo.h>
#endif

#include <QDebug>
Expand Down Expand Up @@ -194,7 +194,7 @@ QString CReporterUtils::deviceUid()
reply.waitForFinished();
if (reply.isError()) {
qCWarning(cr) << "DBus unavailable, UUID might be incorrect.";
return SsuDeviceInfo().deviceUid();
return DeviceInfo(true).deviceUid();
} else {
return reply.value();
}
Expand All @@ -206,7 +206,7 @@ QString CReporterUtils::deviceUid()
QString CReporterUtils::deviceModel()
{
#ifndef CREPORTER_UNIT_TEST
return SsuDeviceInfo().deviceModel();
return DeviceInfo(true).model();
#else
return "Device";
#endif
Expand Down

0 comments on commit 8ea96e9

Please sign in to comment.