mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
Fix some low-hanging warning fruits
This commit is contained in:
parent
b7edab2244
commit
676cdcbbdb
|
@ -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);
|
||||
|
|
|
@ -82,7 +82,7 @@ private:
|
|||
QSet<QByteArray> m_roles;
|
||||
QHash<QString, QByteArray> m_roleForProperty;
|
||||
|
||||
friend class KBalooRolesProviderSingleton;
|
||||
friend struct KBalooRolesProviderSingleton;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue