Pimcommon
7#include "verifynewversionwidget.h"
8#include "pimcommon_debug.h"
9#include "verifynewversion/checknewversiondialog.h"
10#include "verifynewversionutils.h"
11#include <KLocalizedString>
13#include <QDesktopServices>
17VerifyNewVersionWidget::VerifyNewVersionWidget(
QObject *parent)
22VerifyNewVersionWidget::~VerifyNewVersionWidget() =
default;
24bool VerifyNewVersionWidget::canVerifyNewVersion()
const
26 return VerifyNewVersionUtils::canVerifyNewVersion();
29QAction *VerifyNewVersionWidget::verifyNewVersionAction()
31 if (!mVerifyNewVersionAction) {
33 mVerifyNewVersionAction =
new QAction(
i18n(
"Check New Version"),
this);
36 return mVerifyNewVersionAction;
39void VerifyNewVersionWidget::addOsUrlInfo(OsVersion os,
const QString &url)
41 mUrls.insert(os, url);
44void VerifyNewVersionWidget::slotVerifyNewVersion()
48 url = QUrl(mUrls.value(VerifyNewVersionWidget::OsVersion::Windows));
51#if defined(Q_OS_MACOS)
52#ifdef Q_PROCESSOR_ARM_64
53 url = QUrl(mUrls.value(VerifyNewVersionWidget::OsVersion::MacOsArm64));
55 url = QUrl(mUrls.value(VerifyNewVersionWidget::OsVersion::MacOs));
59 CheckNewVersionDialog dlg(
nullptr);
60 dlg.checkNewVersion();
65#include "moc_verifynewversionwidget.cpp"
QString i18n(const char *text, const TYPE &arg...)
void triggered(bool checked)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:24 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.