mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Fix clazy issues
This commit is contained in:
parent
410e222bc8
commit
52ecc82bdc
4 changed files with 9 additions and 9 deletions
|
|
@ -43,8 +43,8 @@ ApplicationListModel::ApplicationListModel(HomeScreen *parent)
|
|||
m_homeScreen(parent)
|
||||
{
|
||||
//can't use the new syntax as this signal is overloaded
|
||||
connect(KSycoca::self(), SIGNAL(databaseChanged(const QStringList &)),
|
||||
this, SLOT(sycocaDbChanged(const QStringList &)));
|
||||
connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)),
|
||||
this, SLOT(sycocaDbChanged(QStringList)));
|
||||
|
||||
loadSettings();
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ void ApplicationListModel::loadSettings()
|
|||
m_maxFavoriteCount = m_homeScreen->config().readEntry("MaxFavoriteCount", 5);
|
||||
|
||||
int i = 0;
|
||||
for (auto app : m_appOrder) {
|
||||
for (const QString &app : qAsConst(m_appOrder)) {
|
||||
m_appPositions[app] = i;
|
||||
++i;
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ Qt::ItemFlags ApplicationListModel::flags(const QModelIndex &index) const
|
|||
{
|
||||
if (!index.isValid())
|
||||
return nullptr;
|
||||
return Qt::ItemIsDragEnabled|QAbstractItemModel::flags(index);
|
||||
return Qt::ItemIsDragEnabled|QAbstractListModel::flags(index);
|
||||
}
|
||||
|
||||
int ApplicationListModel::rowCount(const QModelIndex &parent) const
|
||||
|
|
@ -306,7 +306,7 @@ void ApplicationListModel::moveItem(int row, int destination)
|
|||
m_appOrder.clear();
|
||||
m_appPositions.clear();
|
||||
int i = 0;
|
||||
for (auto app : m_applicationList) {
|
||||
for (const ApplicationData &app : qAsConst(m_applicationList)) {
|
||||
m_appOrder << app.storageId;
|
||||
m_appPositions[app.storageId] = i;
|
||||
++i;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
|
||||
|
||||
Q_INVOKABLE void setLocation(int row, LauncherLocation location);
|
||||
Q_INVOKABLE void setLocation(int row, ApplicationListModel::LauncherLocation location);
|
||||
|
||||
Q_INVOKABLE void moveItem(int row, int order);
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void CallManager::onCallStateChanged(Tp::CallState state)
|
|||
}
|
||||
d->dialerUtils->setCallState("active");
|
||||
d->callTimer = new QTimer(this);
|
||||
connect(d->callTimer, &QTimer::timeout, [=]() {
|
||||
connect(d->callTimer, &QTimer::timeout, d->callTimer, [=]() {
|
||||
d->dialerUtils->setCallDuration(d->dialerUtils->callDuration() + 1);
|
||||
});
|
||||
d->callTimer->start(1000);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void DialerUtils::dial(const QString &number)
|
|||
// FIXME: this should be replaced by kpeople thing
|
||||
qDebug() << "Starting call...";
|
||||
Tp::PendingChannelRequest *pendingChannel = m_simAccount->ensureAudioCall(number);
|
||||
connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){
|
||||
connect(pendingChannel, &Tp::PendingChannelRequest::finished, pendingChannel, [=](){
|
||||
if (pendingChannel->isError()) {
|
||||
qWarning() << "Error when requesting channel" << pendingChannel->errorMessage();
|
||||
setCallState("failed");
|
||||
|
|
@ -78,7 +78,7 @@ const QString DialerUtils::formatNumber(const QString& number)
|
|||
QLocale locale;
|
||||
QStringList qcountry = locale.name().split('_');
|
||||
QString countrycode(qcountry.constLast());
|
||||
const char* country = countrycode.toUtf8().constData();
|
||||
string country = countrycode.toUtf8().constData();
|
||||
PhoneNumberUtil* util = PhoneNumberUtil::GetInstance();
|
||||
AsYouTypeFormatter* formatter = util->PhoneNumberUtil::GetAsYouTypeFormatter(country);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue