Merge branch 'master' of https://github.com/fluxer/kdelibs into devinfo

This commit is contained in:
Ivailo Monev 2021-08-02 03:44:24 +03:00
commit d006e1291a
14 changed files with 22 additions and 66 deletions

View file

@ -96,8 +96,8 @@ void KFileMetaDataConfigurationWidget::Private::addItem(const KUrl& uri)
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#comment", // = fixed item kfileitem#comment
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize", // = fixed item kfileitem#size
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified", // = fixed item kfileitem#modified
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#plainTextContent" // hide this property always
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType", // = fixed item kfileitem#type
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#plainTextContent", // hide this property always
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType", // = fixed item kfileitem#mimetype
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName", // hide this property always
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type", // = fixed item kfileitem#type
0 // mandatory last entry

View file

@ -83,7 +83,7 @@ void KFileMetaDataProvider::Private::readMetadata()
kWarning() << "the API does not handle multile URLs metadata";
}
const QString path = m_urls.first().toLocalFile();
KFileMetaInfo metaInfo(path, KFileMetaInfo::Fastest);
KFileMetaInfo metaInfo(path, KFileMetaInfo::TechnicalInfo);
const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
const QString uriString = metaInfoItem.name();

View file

@ -322,8 +322,15 @@ public:
}
bool useFactory(Strigi::StreamAnalyzerFactory* factory) const {
Q_UNUSED(factory);
// TODO: filter factories based on m_indexDetail
if ((m_indexDetail & KFileMetaInfo::ContentInfo) == 0 && factory) {
if (qstrcmp(factory->name(), "CppLineAnalyzer") == 0) {
return false;
} else if (qstrcmp(factory->name(), "TxtLineAnalyzer") == 0) {
return false;
} else if (qstrcmp(factory->name(), "TextEndAnalyzer") == 0) {
return false;
}
}
return true;
}

View file

@ -61,22 +61,16 @@ public:
* parameters to constructors.
*/
enum What {
Fastest = 0x1, /**< do the fastest possible read and omit all items
that might need a significantly longer time
than the others */
TechnicalInfo = 0x2, /**< extract technical details about the file, like
TechnicalInfo = 0x1, /** extract technical details about the file, like
e.g. play time, resolution or a compressioni
type */
ContentInfo = 0x4, /**< read information about the content of the file
ContentInfo = 0x2, /** read information about the content of the file
like comments or id3 tags */
ExternalSources = 0x8, /**<read external metadata sources such as
ExternalSources = 0x4, /** read external metadata sources such as
filesystem based extended attributes if
they are supported for the filesystem;
RDF storages etc */
Thumbnail = 0x10, /**< only read the file's thumbnail, if it contains
one */
LinkedData = 0x40, //< extract linked/related files like html links, source #include etc
Everything = Fastest | TechnicalInfo | ContentInfo | ExternalSources | Thumbnail | LinkedData ///< read everything, even if it might take a while
Everything = TechnicalInfo | ContentInfo | ExternalSources // read everything, even if it might take a while
};
Q_DECLARE_FLAGS(WhatFlags, What)

View file

@ -42,8 +42,7 @@ class ComboBoxPrivate : public ThemedWidgetInterface<ComboBox>
public:
ComboBoxPrivate(ComboBox *comboBox)
: ThemedWidgetInterface<ComboBox>(comboBox),
background(0),
underMouse(false)
background(0)
{
}
@ -61,7 +60,6 @@ public:
qreal opacity;
QRectF activeRect;
Style::Ptr style;
bool underMouse;
};
void ComboBoxPrivate::syncActiveRect()
@ -267,11 +265,6 @@ void ComboBox::paint(QPainter *painter,
QStyle::PE_IndicatorArrowDown, &comboOpt, painter, nativeWidget());
}
void ComboBox::focusInEvent(QFocusEvent *event)
{
QGraphicsProxyWidget::focusInEvent(event);
}
void ComboBox::focusOutEvent(QFocusEvent *event)
{
QGraphicsWidget *widget = parentWidget();
@ -300,18 +293,6 @@ void ComboBox::focusOutEvent(QFocusEvent *event)
QGraphicsProxyWidget::focusOutEvent(event);
}
void ComboBox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
d->underMouse = true;
QGraphicsProxyWidget::hoverEnterEvent(event);
}
void ComboBox::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
d->underMouse = false;
QGraphicsProxyWidget::hoverLeaveEvent(event);
}
void ComboBox::changeEvent(QEvent *event)
{
d->changeEvent(event);

View file

@ -133,10 +133,7 @@ protected:
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget);
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
void changeEvent(QEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);

View file

@ -42,7 +42,6 @@ class PLASMA_EXPORT ItemBackground : public QGraphicsWidget
Q_OBJECT
Q_PROPERTY(QRectF target READ target WRITE setTarget)
Q_PROPERTY(QGraphicsItem* targetItem READ targetItem WRITE setTargetItem)
Q_PROPERTY(qreal animationUpdate READ animationUpdate WRITE setAnimationUpdate)
public:

View file

@ -556,11 +556,6 @@ void Meter::paint(QPainter *p,
}
}
QSizeF Meter::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
return QGraphicsWidget::sizeHint(which, constraint);
}
} // End of namepace
#include "moc_meter.cpp"

View file

@ -215,7 +215,6 @@ protected:
virtual void paint(QPainter *p,
const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
private:
MeterPrivate *const d;

View file

@ -264,9 +264,7 @@ Q_SIGNALS:
void viewportGeometryChanged(const QRectF &geomety);
protected:
void resizeEvent(QGraphicsSceneResizeEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);

View file

@ -148,11 +148,6 @@ void TextEdit::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
delete popup;
}
void TextEdit::resizeEvent(QGraphicsSceneResizeEvent *event)
{
QGraphicsProxyWidget::resizeEvent(event);
}
void TextEdit::changeEvent(QEvent *event)
{
d->changeEvent(event);

View file

@ -113,7 +113,6 @@ Q_SIGNALS:
void textChanged();
protected:
void resizeEvent(QGraphicsSceneResizeEvent *event);
void changeEvent(QEvent *event);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);

View file

@ -443,13 +443,6 @@ QVariant ToolButton::itemChange(GraphicsItemChange change, const QVariant &value
return QGraphicsProxyWidget::itemChange(change, value);
}
QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
{
QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint);
return hint;
}
} // namespace Plasma
#include "moc_toolbutton.cpp"

View file

@ -184,7 +184,6 @@ protected:
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
void changeEvent(QEvent *event);
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint) const;
private Q_SLOTS:
void setAnimationUpdate(qreal progress);