summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-06 11:03:48 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-06 11:03:48 (GMT)
commit676cdcbbdbea031c1bec56230561bf8a0efcd0f6 (patch)
treedb3eb3588e1657791457aea8e724ac502c242804
parentb7edab22445c78d846353aa88f560bfeb499bdb5 (diff)
Fix some low-hanging warning fruits
-rw-r--r--src/kitemviews/kitemlistwidget.cpp4
-rw-r--r--src/kitemviews/private/kbaloorolesprovider.h2
-rw-r--r--src/panels/places/placesitemlistgroupheader.h2
-rw-r--r--src/panels/places/placespanel.h2
-rw-r--r--src/tests/kfileitemmodeltest.cpp2
-rw-r--r--src/views/dolphinview.cpp4
-rw-r--r--src/views/tooltips/filemetadatatooltip.cpp4
7 files changed, 7 insertions, 13 deletions
diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp
index b834e95..9c31155 100644
--- a/src/kitemviews/kitemlistwidget.cpp
+++ b/src/kitemviews/kitemlistwidget.cpp
@@ -516,10 +516,10 @@ void KItemListWidget::clearHoverCache()
void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QStyle::State styleState)
{
- QStyleOptionViewItemV4 viewItemOption;
+ QStyleOptionViewItem viewItemOption;
viewItemOption.initFrom(widget);
viewItemOption.state = styleState;
- viewItemOption.viewItemPosition = QStyleOptionViewItemV4::OnlyOne;
+ viewItemOption.viewItemPosition = QStyleOptionViewItem::OnlyOne;
viewItemOption.showDecorationSelected = true;
viewItemOption.rect = selectionRect().toRect();
widget->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewItemOption, painter, widget);
diff --git a/src/kitemviews/private/kbaloorolesprovider.h b/src/kitemviews/private/kbaloorolesprovider.h
index 9673bff..a9bd2e8 100644
--- a/src/kitemviews/private/kbaloorolesprovider.h
+++ b/src/kitemviews/private/kbaloorolesprovider.h
@@ -82,7 +82,7 @@ private:
QSet<QByteArray> m_roles;
QHash<QString, QByteArray> m_roleForProperty;
- friend class KBalooRolesProviderSingleton;
+ friend struct KBalooRolesProviderSingleton;
};
#endif
diff --git a/src/panels/places/placesitemlistgroupheader.h b/src/panels/places/placesitemlistgroupheader.h
index 7daaba6..ec845e0 100644
--- a/src/panels/places/placesitemlistgroupheader.h
+++ b/src/panels/places/placesitemlistgroupheader.h
@@ -33,7 +33,7 @@ public:
protected:
virtual void paintSeparator(QPainter* painter, const QColor& color) Q_DECL_OVERRIDE;
- virtual QPalette::ColorRole normalTextColorRole() const;
+ virtual QPalette::ColorRole normalTextColorRole() const Q_DECL_OVERRIDE;
};
#endif
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h
index 81aeedb..0c8b5f7 100644
--- a/src/panels/places/placespanel.h
+++ b/src/panels/places/placespanel.h
@@ -52,7 +52,7 @@ protected:
virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
public slots:
- virtual void readSettings();
+ virtual void readSettings() Q_DECL_OVERRIDE;
private slots:
void slotItemActivated(int index);
diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp
index eba32e1..6c45e11 100644
--- a/src/tests/kfileitemmodeltest.cpp
+++ b/src/tests/kfileitemmodeltest.cpp
@@ -1674,7 +1674,7 @@ void KFileItemModelTest::testCollapseFolderWhileLoading()
const KFileItem fileItemC1 = m_model->fileItem(2);
KFileItem fileItemC2 = fileItemC1;
QUrl urlC2 = fileItemC2.url();
- urlC2.adjusted(QUrl::RemoveFilename);
+ urlC2 = urlC2.adjusted(QUrl::RemoveFilename);
urlC2.setPath(urlC2.path() + "c2.txt");
fileItemC2.setUrl(urlC2);
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 5466fd3..a737dd0 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -75,10 +75,6 @@
#endif
#include <KFormat>
-namespace {
- const int MaxModeEnum = DolphinView::CompactView;
-}
-
DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
QWidget(parent),
m_active(true),
diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp
index 8fbca29..0d58717 100644
--- a/src/views/tooltips/filemetadatatooltip.cpp
+++ b/src/views/tooltips/filemetadatatooltip.cpp
@@ -48,7 +48,7 @@ FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) :
m_fileMetaDataWidget(0)
{
setAttribute(Qt::WA_TranslucentBackground);
- setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint);
+ setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint);
// Create widget for file preview
m_preview = new QLabel(this);
@@ -174,8 +174,6 @@ void FileMetaDataToolTip::paintEvent(QPaintEvent* event)
void FileMetaDataToolTip::showEvent(QShowEvent *)
{
-#pragma message("TODO: port Plasma::WindowEffects::overrideShadow")
- //Plasma::WindowEffects::overrideShadow(winId(), true);
KWindowEffects::enableBlurBehind(winId(), true, mask());
}