Commit 46d16597 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some warning

parent 02389531
......@@ -144,7 +144,7 @@ void RecentAddresses::setMaxCount(int count)
}
}
uint RecentAddresses::maxCount() const
int RecentAddresses::maxCount() const
{
return m_maxCount;
}
......
......@@ -80,7 +80,7 @@ public:
/**
* @returns the current maximum number of entries.
*/
uint maxCount() const;
int maxCount() const;
/**
* Loads the list of recently used addresses from the configfile.
......
......@@ -43,9 +43,9 @@ public:
}
}
KWallet::Wallet *wallet = nullptr;
bool useWallet = false;
bool askWallet = true;
KWallet::Wallet *wallet = nullptr;
};
Q_GLOBAL_STATIC_WITH_ARGS(KConfig, s_config, (QLatin1String("kabldaprc"), KConfig::NoGlobals))
......
......@@ -131,7 +131,7 @@ void MultiplyingLineView::slotReturnPressed(MultiplyingLine *line)
void MultiplyingLineView::slotDownPressed(MultiplyingLine *line)
{
int pos = mLines.indexOf(line);
if (pos >= (int)mLines.count() - 1) {
if (pos >= (mLines.count() - 1)) {
Q_EMIT focusDown();
} else if (pos >= 0) {
activateLine(mLines.at(pos + 1));
......
......@@ -74,7 +74,6 @@ void SSLLabel::setState(State state)
hide();
break;
case Clean:
default:
setToolTip(QString());
hide();
//we return because we do not save the state as the only
......
......@@ -286,7 +286,7 @@ void StatusbarProgressWidget::slotClean()
bool StatusbarProgressWidget::eventFilter(QObject *obj, QEvent *ev)
{
if (ev->type() == QEvent::MouseButtonPress) {
QMouseEvent *e = (QMouseEvent *)ev;
QMouseEvent *e = static_cast<QMouseEvent *>(ev);
if (e->button() == Qt::LeftButton && mMode == Progress) { // toggle view on left mouse button
// Consensus seems to be that we should show/hide the fancy dialog when the user
......
......@@ -178,10 +178,6 @@ QString CustomLogWidget::toHtml() const
case EndLine:
logText = QStringLiteral("<br/>");
break;
default:
qCDebug(LIBKDEPIM_LOG) << "LogType undefined" << type;
logText += itemWidget->text();
break;
}
result += QLatin1String("<p>") + logText + QLatin1String("</p>") + QLatin1Char('\n');
}
......
......@@ -149,7 +149,7 @@ void KWidgetLister::slotMore()
{
// the class should make certain that slotMore can't
// be called when mMaxWidgets are on screen.
assert((int)d->mWidgetList.count() < d->mMaxWidgets);
assert(d->mWidgetList.count() < d->mMaxWidgets);
addWidgetAtEnd();
// adjustSize();
......@@ -160,7 +160,7 @@ void KWidgetLister::slotFewer()
{
// the class should make certain that slotFewer can't
// be called when mMinWidgets are on screen.
assert((int)d->mWidgetList.count() > d->mMinWidgets);
assert(d->mWidgetList.count() > d->mMinWidgets);
removeLastWidget();
// adjustSize();
......@@ -217,8 +217,8 @@ QWidget *KWidgetLister::createWidget(QWidget *parent)
void KWidgetLister::setNumberOfShownWidgetsTo(int aNum)
{
int superfluousWidgets = qMax((int)d->mWidgetList.count() - aNum, 0);
int missingWidgets = qMax(aNum - (int)d->mWidgetList.count(), 0);
int superfluousWidgets = qMax(d->mWidgetList.count() - aNum, 0);
int missingWidgets = qMax(aNum - d->mWidgetList.count(), 0);
// remove superfluous widgets
for (; superfluousWidgets; superfluousWidgets--) {
......
......@@ -812,7 +812,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *object, QEvent *event)
// when iterating forward, start at the currentindex, when backwards,
// one up from our header, or at the end
uint j;
int j;
if (keyEvent->key() == Qt::Key_Tab) {
j = currentIndex;
} else {
......
......@@ -566,7 +566,6 @@ void AddresseeLineEditPrivate::doCompletion(bool ctrlT)
break;
case KCompletion::CompletionNone:
default: // fall through
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment