264 lines
7.7 KiB
Diff
264 lines
7.7 KiB
Diff
diff --git a/src/widgets/kcategorizedsortfilterproxymodel.cpp b/src/widgets/kcategorizedsortfilterproxymodel.cpp
|
|
index c433c3d..0cb93ac 100644
|
|
--- a/src/widgets/kcategorizedsortfilterproxymodel.cpp
|
|
+++ b/src/widgets/kcategorizedsortfilterproxymodel.cpp
|
|
@@ -28,8 +28,6 @@
|
|
#include <QStringList>
|
|
#include <QSize>
|
|
|
|
-#include <kstringhandler.h>
|
|
-
|
|
KCategorizedSortFilterProxyModel::KCategorizedSortFilterProxyModel(QObject *parent)
|
|
: QSortFilterProxyModel(parent)
|
|
, d(new Private())
|
|
@@ -94,14 +92,6 @@ bool KCategorizedSortFilterProxyModel::sortCategoriesByNaturalComparison() const
|
|
return d->sortCategoriesByNaturalComparison;
|
|
}
|
|
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
-int KCategorizedSortFilterProxyModel::naturalCompare(const QString &a,
|
|
- const QString &b)
|
|
-{
|
|
- return KStringHandler::naturalCompare(a, b);
|
|
-}
|
|
-#endif
|
|
-
|
|
bool KCategorizedSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
|
{
|
|
if (d->categorizedModel)
|
|
@@ -142,7 +132,7 @@ int KCategorizedSortFilterProxyModel::compareCategories(const QModelIndex &left,
|
|
|
|
if (d->sortCategoriesByNaturalComparison)
|
|
{
|
|
- return KStringHandler::naturalCompare(lstr, rstr);
|
|
+ return QString::localeAwareCompare(lstr, rstr);
|
|
}
|
|
else
|
|
{
|
|
diff --git a/src/widgets/kcategorizedsortfilterproxymodel.h b/src/widgets/kcategorizedsortfilterproxymodel.h
|
|
index a3146dc..de356c3 100644
|
|
--- a/src/widgets/kcategorizedsortfilterproxymodel.h
|
|
+++ b/src/widgets/kcategorizedsortfilterproxymodel.h
|
|
@@ -24,8 +24,6 @@
|
|
|
|
#include <QtGui/QSortFilterProxyModel>
|
|
|
|
-#include <kdeui_export.h>
|
|
-
|
|
class QItemSelection;
|
|
|
|
|
|
@@ -42,7 +40,7 @@ class QItemSelection;
|
|
*
|
|
* @author Rafael Fernández López <ereslibre@kde.org>
|
|
*/
|
|
-class KDEUI_EXPORT KCategorizedSortFilterProxyModel
|
|
+class KCategorizedSortFilterProxyModel
|
|
: public QSortFilterProxyModel
|
|
{
|
|
public:
|
|
@@ -104,17 +102,6 @@ public:
|
|
*/
|
|
bool sortCategoriesByNaturalComparison() const;
|
|
|
|
- /**
|
|
- * Does a natural comparing of the strings. A negative value is returned if \a a
|
|
- * is smaller than \a b. A positive value is returned if \a a is greater than \a b. 0
|
|
- * is returned if both values are equal.
|
|
- * @deprecated
|
|
- * Use KStringHandler::naturalCompare() instead.
|
|
- */
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
- KDE_DEPRECATED static int naturalCompare(const QString &a, const QString &b);
|
|
-#endif
|
|
-
|
|
protected:
|
|
/**
|
|
* Overridden from QSortFilterProxyModel. If you are subclassing
|
|
diff --git a/src/widgets/kcategorizedview.cpp b/src/widgets/kcategorizedview.cpp
|
|
index 46a1cde..7e99468 100644
|
|
--- a/src/widgets/kcategorizedview.cpp
|
|
+++ b/src/widgets/kcategorizedview.cpp
|
|
@@ -33,7 +33,6 @@
|
|
#include "kcategorizedview_p.h"
|
|
|
|
#include <math.h> // trunc on C99 compliant systems
|
|
-#include <kdefakes.h> // trunc for not C99 compliant systems
|
|
|
|
#include <QPainter>
|
|
#include <QScrollBar>
|
|
@@ -1455,28 +1454,6 @@ void KCategorizedView::rowsInserted(const QModelIndex &parent,
|
|
d->rowsInserted(parent, start, end);
|
|
}
|
|
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
-void KCategorizedView::rowsInsertedArtifficial(const QModelIndex &parent,
|
|
- int start,
|
|
- int end)
|
|
-{
|
|
- Q_UNUSED(parent);
|
|
- Q_UNUSED(start);
|
|
- Q_UNUSED(end);
|
|
-}
|
|
-#endif
|
|
-
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
-void KCategorizedView::rowsRemoved(const QModelIndex &parent,
|
|
- int start,
|
|
- int end)
|
|
-{
|
|
- Q_UNUSED(parent);
|
|
- Q_UNUSED(start);
|
|
- Q_UNUSED(end);
|
|
-}
|
|
-#endif
|
|
-
|
|
void KCategorizedView::slotLayoutChanged()
|
|
{
|
|
if (!d->isCategorized()) {
|
|
@@ -1492,5 +1469,3 @@ void KCategorizedView::slotLayoutChanged()
|
|
}
|
|
|
|
//END: Public part
|
|
-
|
|
-#include "kcategorizedview.moc"
|
|
diff --git a/src/widgets/kcategorizedview.h b/src/widgets/kcategorizedview.h
|
|
index b03744e..8f5ad9a 100644
|
|
--- a/src/widgets/kcategorizedview.h
|
|
+++ b/src/widgets/kcategorizedview.h
|
|
@@ -23,8 +23,6 @@
|
|
|
|
#include <QtGui/QListView>
|
|
|
|
-#include <kdeui_export.h>
|
|
-
|
|
class KCategoryDrawer;
|
|
class KCategoryDrawerV2;
|
|
|
|
@@ -76,7 +74,7 @@ class KCategoryDrawerV2;
|
|
*
|
|
* @author Rafael Fernández López <ereslibre@kde.org>
|
|
*/
|
|
-class KDEUI_EXPORT KCategorizedView
|
|
+class KCategorizedView
|
|
: public QListView
|
|
{
|
|
Q_OBJECT
|
|
@@ -310,26 +308,6 @@ protected:
|
|
protected Q_SLOTS:
|
|
/**
|
|
* @internal
|
|
- * @warning Deprecated since 4.4.
|
|
- */
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
- virtual KDE_DEPRECATED void rowsInsertedArtifficial(const QModelIndex &parent,
|
|
- int start,
|
|
- int end);
|
|
-#endif
|
|
-
|
|
- /**
|
|
- * @internal
|
|
- * @warning Deprecated since 4.4.
|
|
- */
|
|
-#ifndef KDE_NO_DEPRECATED
|
|
- virtual KDE_DEPRECATED void rowsRemoved(const QModelIndex &parent,
|
|
- int start,
|
|
- int end);
|
|
-#endif
|
|
-
|
|
- /**
|
|
- * @internal
|
|
* Reposition items as needed.
|
|
*/
|
|
virtual void slotLayoutChanged();
|
|
@@ -341,4 +319,6 @@ private:
|
|
Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
|
|
};
|
|
|
|
+#include "kcategorizedview_p.h"
|
|
+
|
|
#endif // KCATEGORIZEDVIEW_H
|
|
diff --git a/src/widgets/kcategorydrawer.cpp b/src/widgets/kcategorydrawer.cpp
|
|
index 2747e5b..5f5ce78 100644
|
|
--- a/src/widgets/kcategorydrawer.cpp
|
|
+++ b/src/widgets/kcategorydrawer.cpp
|
|
@@ -24,7 +24,6 @@
|
|
#include <QStyleOption>
|
|
#include <QApplication>
|
|
|
|
-#include <kiconloader.h>
|
|
#include <kcategorizedview.h>
|
|
#include <kcategorizedsortfilterproxymodel.h>
|
|
|
|
@@ -280,5 +279,3 @@ void KCategoryDrawerV3::mouseButtonDoubleClicked(const QModelIndex&, const QRect
|
|
void KCategoryDrawerV3::mouseLeft(const QModelIndex&, const QRect&)
|
|
{
|
|
}
|
|
-
|
|
-#include "kcategorydrawer.moc"
|
|
diff --git a/src/widgets/kcategorydrawer.h b/src/widgets/kcategorydrawer.h
|
|
index c24a0b8..d69b1b9 100644
|
|
--- a/src/widgets/kcategorydrawer.h
|
|
+++ b/src/widgets/kcategorydrawer.h
|
|
@@ -21,8 +21,6 @@
|
|
#ifndef KCATEGORYDRAWER_H
|
|
#define KCATEGORYDRAWER_H
|
|
|
|
-#include <kdeui_export.h>
|
|
-
|
|
#include <QtCore/QObject>
|
|
#include <QtGui/QMouseEvent>
|
|
|
|
@@ -40,10 +38,10 @@ class KCategorizedView;
|
|
*
|
|
* @warning Please use KCategoryDrawerV3 instead
|
|
*/
|
|
-class KDEUI_EXPORT KCategoryDrawer
|
|
+class KCategoryDrawer
|
|
{
|
|
public:
|
|
- KDE_DEPRECATED KCategoryDrawer();
|
|
+ KCategoryDrawer();
|
|
|
|
virtual ~KCategoryDrawer();
|
|
|
|
@@ -110,23 +108,23 @@ private:
|
|
*
|
|
* @warning Please use KCategoryDrawerV3 instead
|
|
*/
|
|
-class KDEUI_EXPORT KCategoryDrawerV2
|
|
+class KCategoryDrawerV2
|
|
: public QObject
|
|
, public KCategoryDrawer
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
- KDE_DEPRECATED KCategoryDrawerV2(QObject *parent = 0);
|
|
+ KCategoryDrawerV2(QObject *parent = 0);
|
|
virtual ~KCategoryDrawerV2();
|
|
|
|
- KDE_DEPRECATED virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event);
|
|
+ virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event);
|
|
|
|
- KDE_DEPRECATED virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event);
|
|
+ virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event);
|
|
|
|
- KDE_DEPRECATED virtual void mouseButtonMoved(const QModelIndex &index, QMouseEvent *event);
|
|
+ virtual void mouseButtonMoved(const QModelIndex &index, QMouseEvent *event);
|
|
|
|
- KDE_DEPRECATED virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event);
|
|
+ virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event);
|
|
|
|
Q_SIGNALS:
|
|
/**
|
|
@@ -147,7 +145,7 @@ Q_SIGNALS:
|
|
/**
|
|
* @since 4.5
|
|
*/
|
|
-class KDEUI_EXPORT KCategoryDrawerV3
|
|
+class KCategoryDrawerV3
|
|
: public KCategoryDrawerV2
|
|
{
|
|
friend class KCategorizedView;
|