[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdelibs/frameworks] /: Finish to ifdef deprecated methods
From:       Kevin Ottens <ervin+bluesystems () kde ! org>
Date:       2013-08-20 15:07:16
Message-ID: E1VBnWe-0005lq-TY () scm ! kde ! org
[Download RAW message or body]

Git commit aa6d3361165db0140a8c8f24aeba48ef62b97f38 by Kevin Ottens.
Committed on 20/08/2013 at 12:17.
Pushed by ervin into branch 'frameworks'.

Finish to ifdef deprecated methods

M  +2    -0    kio/kfile/kpropertiesdialog.h
M  +0    -9    kio/kfile/krecentdocument.cpp
M  +10   -1    kio/kfile/krecentdocument.h
M  +4    -0    staging/itemviews/src/kcategorydrawer.cpp
M  +4    -0    staging/itemviews/src/kcategorydrawer.h
M  +0    -115  staging/kde4attic/src/date/kcalendarsystem.cpp
M  +116  -13   staging/kde4attic/src/date/kcalendarsystem.h
M  +4    -0    staging/kde4attic/src/date/kdatetime.h
M  +2    -0    staging/kiconthemes/src/kiconloader.cpp
M  +2    -0    staging/kiconthemes/src/kiconloader.h
M  +2    -0    staging/kio/src/core/ksambashare.cpp
M  +2    -0    staging/kio/src/core/ksambashare.h
M  +2    -0    staging/kio/src/widgets/paste.cpp
M  +2    -0    staging/kio/src/widgets/paste.h
M  +2    -0    staging/kservice/src/plugin/kexportplugin.h
M  +2    -1    staging/kservice/src/plugin/klibrary.cpp
M  +2    -0    staging/kservice/src/plugin/klibrary.h
M  +2    -4    staging/xmlgui/src/kmainwindow.cpp
M  +7    -1    staging/xmlgui/src/kmainwindow.h
M  +3    -1    tier1/karchive/src/kfilterdev.cpp
M  +4    -0    tier1/karchive/src/kfilterdev.h

http://commits.kde.org/kdelibs/aa6d3361165db0140a8c8f24aeba48ef62b97f38

diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h
index 2f420c1..bea8758 100644
--- a/kio/kfile/kpropertiesdialog.h
+++ b/kio/kfile/kpropertiesdialog.h
@@ -201,10 +201,12 @@ public:
    */
   void insertPlugin (KPropertiesDialogPlugin *plugin);
 
+#ifndef KDE_NO_DEPRECATED
     /**
      * @deprecated since 5.0, use url()
      */
     KIO_DEPRECATED QUrl kurl() const { return url(); }
+#endif
 
     /**
      * The URL of the file that has its properties being displayed.
diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp
index b41f395..4b3bee8 100644
--- a/kio/kfile/krecentdocument.cpp
+++ b/kio/kfile/krecentdocument.cpp
@@ -151,15 +151,6 @@ void KRecentDocument::add(const QUrl& url, const QString& \
desktopEntryName)  conf.writeEntry( "Icon", KIO::iconNameForUrl( url ) );
 }
 
-void KRecentDocument::add(const QString &openStr, bool isUrl)
-{
-    if (isUrl) {
-        add(QUrl(openStr));
-    } else {
-        add(QUrl::fromLocalFile(openStr));
-    }
-}
-
 void KRecentDocument::clear()
 {
   const QStringList list = recentDocuments();
diff --git a/kio/kfile/krecentdocument.h b/kio/kfile/krecentdocument.h
index 59188f2..a98bee5 100644
--- a/kio/kfile/krecentdocument.h
+++ b/kio/kfile/krecentdocument.h
@@ -87,7 +87,16 @@ public:
      * @param isURL Set to @p true if @p documentStr is an URL and not a local file \
                path.
      * @deprecated call add(QUrl(str)) if isURL=true, and \
                add(QUrl::fromLocalFile(str)) if isURL=false.
      */
-    static KIO_DEPRECATED void add(const QString &documentStr, bool isURL = false);
+#ifndef KDE_NO_DEPRECATED
+    static KIO_DEPRECATED void add(const QString &documentStr, bool isUrl = false)
+    {
+        if (isUrl) {
+            add(QUrl(documentStr));
+        } else {
+            add(QUrl::fromLocalFile(documentStr));
+        }
+    }
+#endif
 
     /**
      * Clear the recent document menu of all entries.
diff --git a/staging/itemviews/src/kcategorydrawer.cpp \
b/staging/itemviews/src/kcategorydrawer.cpp index ec60ebd..0fb857e 100644
--- a/staging/itemviews/src/kcategorydrawer.cpp
+++ b/staging/itemviews/src/kcategorydrawer.cpp
@@ -46,12 +46,14 @@ public:
     int rightMargin;
 };
 
+#ifndef KDE_NO_DEPRECATED
 KCategoryDrawer::KCategoryDrawer()
     : d(new Private)
 {
     setLeftMargin(2);
     setRightMargin(2);
 }
+#endif
 
 KCategoryDrawer::~KCategoryDrawer()
 {
@@ -195,6 +197,7 @@ KCategoryDrawer &KCategoryDrawer::operator=(const KCategoryDrawer \
&cd)  return *this;
 }
 
+#ifndef KDE_NO_DEPRECATED
 KCategoryDrawerV2::KCategoryDrawerV2(QObject *parent)
     : QObject(parent)
     , KCategoryDrawer()
@@ -224,6 +227,7 @@ void KCategoryDrawerV2::mouseButtonDoubleClicked(const \
QModelIndex&, QMouseEvent  {
     event->ignore();
 }
+#endif
 
 class KCategoryDrawerV3::Private
 {
diff --git a/staging/itemviews/src/kcategorydrawer.h \
b/staging/itemviews/src/kcategorydrawer.h index 4a59d46..3665457 100644
--- a/staging/itemviews/src/kcategorydrawer.h
+++ b/staging/itemviews/src/kcategorydrawer.h
@@ -43,7 +43,9 @@ class KCategorizedView;
 class ITEMVIEWS_EXPORT KCategoryDrawer
 {
 public:
+#ifndef KDE_NO_DEPRECATED
     ITEMVIEWS_DEPRECATED KCategoryDrawer();
+#endif
 
     virtual ~KCategoryDrawer();
 
@@ -117,6 +119,7 @@ class ITEMVIEWS_EXPORT KCategoryDrawerV2
     Q_OBJECT
 
 public:
+#ifndef KDE_NO_DEPRECATED
     ITEMVIEWS_DEPRECATED KCategoryDrawerV2(QObject *parent = 0);
     virtual ~KCategoryDrawerV2();
 
@@ -127,6 +130,7 @@ public:
     ITEMVIEWS_DEPRECATED virtual void mouseButtonMoved(const QModelIndex &index, \
QMouseEvent *event);  
     ITEMVIEWS_DEPRECATED virtual void mouseButtonDoubleClicked(const QModelIndex \
&index, QMouseEvent *event); +#endif
 
 Q_SIGNALS:
     /**
diff --git a/staging/kde4attic/src/date/kcalendarsystem.cpp \
b/staging/kde4attic/src/date/kcalendarsystem.cpp index bc510be..ac00dc2 100644
--- a/staging/kde4attic/src/date/kcalendarsystem.cpp
+++ b/staging/kde4attic/src/date/kcalendarsystem.cpp
@@ -922,12 +922,6 @@ bool KCalendarSystem::setDateIsoWeek(QDate &date, int year, int \
isoWeekNumber, i  return false;
 }
 
-// Deprecated
-bool KCalendarSystem::setYMD(QDate &date, int year, int month, int day) const
-{
-    return setDate(date, year, month, day);
-}
-
 // NOT VIRTUAL - If override needed use shared-d
 void KCalendarSystem::getDate(const QDate date, int *year, int *month, int *day) \
const  {
@@ -1491,115 +1485,6 @@ QString KCalendarSystem::weekDayName(const QDate &date, \
WeekDayNameFormat format  return QString();
 }
 
-QString KCalendarSystem::yearString(const QDate &date, StringFormat format) const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::Year, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::Year, KLocale::LongNumber);
-    }
-}
-
-QString KCalendarSystem::monthString(const QDate &date, StringFormat format) const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::Month, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::Month, KLocale::LongNumber);
-    }
-}
-
-QString KCalendarSystem::dayString(const QDate &date, StringFormat format) const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::Day, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::Day, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::yearInEraString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::YearInEra, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::YearInEra, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::dayOfYearString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::DayOfYear, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::DayOfYear, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::dayOfWeekString(const QDate &date) const
-{
-    return formatDate(date, KLocale::DayOfWeek, KLocale::ShortNumber);
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::weekNumberString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::Week, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::Week, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::monthsInYearString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::MonthsInYear, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::MonthsInYear, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::weeksInYearString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::WeeksInYear, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::WeeksInYear, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::daysInYearString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::DaysInYear, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::DaysInYear, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::daysInMonthString(const QDate &date, StringFormat format) \
                const
-{
-    if (format == ShortFormat) {
-        return formatDate(date, KLocale::DaysInMonth, KLocale::ShortNumber);
-    } else {
-        return formatDate(date, KLocale::DaysInMonth, KLocale::LongNumber);
-    }
-}
-
-// NOT VIRTUAL - If override needed use shared-d
-QString KCalendarSystem::daysInWeekString(const QDate &date) const
-{
-    return formatDate(date, KLocale::DaysInWeek, KLocale::ShortNumber);
-}
-
 int KCalendarSystem::yearStringToInteger(const QString &yearString, int &readLength) \
const  {
     Q_D(const KCalendarSystem);
diff --git a/staging/kde4attic/src/date/kcalendarsystem.h \
b/staging/kde4attic/src/date/kcalendarsystem.h index 0dc8f54..75faa28 100644
--- a/staging/kde4attic/src/date/kcalendarsystem.h
+++ b/staging/kde4attic/src/date/kcalendarsystem.h
@@ -131,7 +131,9 @@ public:
      *
      * @return type of calendar system
      */
+#ifndef KDE_NO_DEPRECATED
     KDE4ATTIC_DEPRECATED virtual QString calendarType() const = 0;
+#endif
 
     /**
      * @since 4.6
@@ -319,7 +321,10 @@ public:
      * @param d Day of month
      * @return true if the date is valid; otherwise returns false.
      */
-    KDE4ATTIC_DEPRECATED virtual bool setYMD(QDate &date, int y, int m, int d) \
const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED virtual bool setYMD(QDate &date, int y, int m, int d) const
+    { return setDate(date, y, m, d); }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -622,10 +627,12 @@ public:
      * @param yearNum returns the year the date belongs to
      * @return ISO week number, -1 if input date invalid
      */
+#ifndef KDE_NO_DEPRECATED
     KDE4ATTIC_DEPRECATED inline int weekNumber(const QDate &date, int *yearNum = 0) \
const  {
         return week(date, KLocale::IsoWeekNumber, yearNum);
     }
+#endif
 
     /**
      * Returns the localized Week Number for the date.
@@ -832,7 +839,16 @@ public:
      * @return year literal of the date, empty string if any error
      * @see year()
      */
-    KDE4ATTIC_DEPRECATED virtual QString yearString(const QDate &date, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED virtual QString yearString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::Year, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::Year, KLocale::LongNumber);
+        }
+    }
+#endif
 
     /**
      * @deprecated use formatDate(QDate, KLocale::DateTimeComponent, \
KLocale::DateTimeComponentFormat) @@ -844,7 +860,16 @@ public:
      * @return The month literal of the date, empty string if any error
      * @see month()
      */
-    KDE4ATTIC_DEPRECATED virtual QString monthString(const QDate &pDate, \
StringFormat format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED virtual QString monthString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::Month, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::Month, KLocale::LongNumber);
+        }
+    }
+#endif
 
     /**
      * @deprecated use formatDate(QDate, KLocale::DateTimeComponent, \
KLocale::DateTimeComponentFormat) @@ -856,7 +881,16 @@ public:
      * @return The day literal of the date, empty string if any error
      * @see day()
      */
-    KDE4ATTIC_DEPRECATED virtual QString dayString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED virtual QString dayString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::Day, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::Day, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -870,7 +904,16 @@ public:
      * @param format format to return, either short or long
      * @return Year In Era literal of the date, empty string if any error
      */
-    KDE4ATTIC_DEPRECATED QString yearInEraString(const QDate &date, StringFormat \
format = ShortFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString yearInEraString(const QDate &date, StringFormat \
format = ShortFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::YearInEra, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::YearInEra, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -885,7 +928,16 @@ public:
      * @return The day of year literal of the date, empty string if any error
      * @see dayOfYear()
      */
-    KDE4ATTIC_DEPRECATED QString dayOfYearString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString dayOfYearString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::DayOfYear, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::DayOfYear, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -899,7 +951,10 @@ public:
      * @return The day of week literal of the date, empty string if any error
      * @see dayOfWeek()
      */
-    KDE4ATTIC_DEPRECATED QString dayOfWeekString(const QDate &pDate) const;
+#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString dayOfWeekString(const QDate &date) const
+    { return formatDate(date, KLocale::DayOfWeek, KLocale::ShortNumber); }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -914,7 +969,16 @@ public:
      * @return The day literal of the date, empty string if any error
      * @see weekNumber()
      */
-    KDE4ATTIC_DEPRECATED QString weekNumberString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString weekNumberString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::Week, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::Week, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -929,7 +993,16 @@ public:
      * @return The months in year literal of the date, empty string if any error
      * @see monthsInYear()
      */
-    KDE4ATTIC_DEPRECATED QString monthsInYearString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString monthsInYearString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::MonthsInYear, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::MonthsInYear, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -944,7 +1017,16 @@ public:
      * @return The weeks in year literal of the date, empty string if any error
      * @see weeksInYear()
      */
-    KDE4ATTIC_DEPRECATED QString weeksInYearString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString weeksInYearString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::WeeksInYear, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::WeeksInYear, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -959,7 +1041,16 @@ public:
      * @return The days in year literal of the date, empty string if any error
      * @see daysInYear()
      */
-    KDE4ATTIC_DEPRECATED QString daysInYearString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString daysInYearString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::DaysInYear, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::DaysInYear, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -974,7 +1065,16 @@ public:
      * @return The days in month literal of the date, empty string if any error
      * @see daysInMonth()
      */
-    KDE4ATTIC_DEPRECATED QString daysInMonthString(const QDate &pDate, StringFormat \
format = LongFormat) const; +#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString daysInMonthString(const QDate &date, StringFormat \
format = LongFormat) const +    {
+        if (format == ShortFormat) {
+            return formatDate(date, KLocale::DaysInMonth, KLocale::ShortNumber);
+        } else {
+            return formatDate(date, KLocale::DaysInMonth, KLocale::LongNumber);
+        }
+    }
+#endif
 
     //KDE5 make virtual?
     /**
@@ -988,7 +1088,10 @@ public:
      * @return The days in week literal of the date, empty string if any error
      * @see daysInWeek()
      */
-    KDE4ATTIC_DEPRECATED QString daysInWeekString(const QDate &date) const;
+#ifndef KDE_NO_DEPRECATED
+    KDE4ATTIC_DEPRECATED QString daysInWeekString(const QDate &date) const
+    { return formatDate(date, KLocale::DaysInWeek, KLocale::ShortNumber); }
+#endif
 
     //KDE5 make protected or remove?
     /**
diff --git a/staging/kde4attic/src/date/kdatetime.h \
b/staging/kde4attic/src/date/kdatetime.h index 8b43283..1668de3 100644
--- a/staging/kde4attic/src/date/kdatetime.h
+++ b/staging/kde4attic/src/date/kdatetime.h
@@ -1073,10 +1073,12 @@ class KDE4ATTIC_EXPORT KDateTime //krazy:exclude=dpointer \
                (implicitly shared)
      * @return number of seconds difference
      * @see secsTo(), addSecs(), daysTo()
      */
+#ifndef KDE_NO_DEPRECATED
     KDE4ATTIC_DEPRECATED inline qint64 secsTo_long(const KDateTime &other) const
     {
         return secsTo(other);
     }
+#endif
 
     /**
      * Calculates the number of days from this date/time to the @p other date/time.
@@ -1441,10 +1443,12 @@ class KDE4ATTIC_EXPORT KDateTime //krazy:exclude=dpointer \
                (implicitly shared)
      * @see isValid()
      * @deprecated Since 5.0, we now supports all valid dates.
      */
+#ifndef KDE_NO_DEPRECATED
     KDE4ATTIC_DEPRECATED inline bool outOfRange() const
     {
         return false;
     }
+#endif
 
     /**
      * Compare this instance with another to determine whether they are
diff --git a/staging/kiconthemes/src/kiconloader.cpp \
b/staging/kiconthemes/src/kiconloader.cpp index 3e2d831..a5bfe3f 100644
--- a/staging/kiconthemes/src/kiconloader.cpp
+++ b/staging/kiconthemes/src/kiconloader.cpp
@@ -1617,6 +1617,7 @@ KIconLoader *KIconLoader::global()
     return globalIconLoader();
 }
 
+#ifndef KDE_NO_DEPRECATED
 void KIconLoader::newIconLoader()
 {
     if ( global() == this) {
@@ -1626,6 +1627,7 @@ void KIconLoader::newIconLoader()
     reconfigure(objectName());
     emit iconLoaderSettingsChanged();
 }
+#endif
 
 void KIconLoader::emitChange(KIconLoader::Group g)
 {
diff --git a/staging/kiconthemes/src/kiconloader.h \
b/staging/kiconthemes/src/kiconloader.h index 8369568..65346df 100644
--- a/staging/kiconthemes/src/kiconloader.h
+++ b/staging/kiconthemes/src/kiconloader.h
@@ -444,7 +444,9 @@ public:
     *
     * @deprecated since 5.0, use emitChange(Group)
     */
+#ifndef KDE_NO_DEPRECATED
     KICONTHEMES_DEPRECATED void newIconLoader();
+#endif
 
     /**
      * Emits an iconChanged() signal on all the KIconLoader instances in the system
diff --git a/staging/kio/src/core/ksambashare.cpp \
b/staging/kio/src/core/ksambashare.cpp index 9f4782f..382a87f 100644
--- a/staging/kio/src/core/ksambashare.cpp
+++ b/staging/kio/src/core/ksambashare.cpp
@@ -451,11 +451,13 @@ KSambaShare::~KSambaShare()
     delete d_ptr;
 }
 
+#ifndef KDE_NO_DEPRECATED
 QString KSambaShare::smbConfPath() const
 {
     Q_D(const KSambaShare);
     return d->smbConf;
 }
+#endif
 
 bool KSambaShare::isDirectoryShared(const QString &path) const
 {
diff --git a/staging/kio/src/core/ksambashare.h b/staging/kio/src/core/ksambashare.h
index ff5d362..ab329c6 100644
--- a/staging/kio/src/core/ksambashare.h
+++ b/staging/kio/src/core/ksambashare.h
@@ -112,7 +112,9 @@ public:
      *
      * @deprecated
      */
+#ifndef KDE_NO_DEPRECATED
     KIOCORE_DEPRECATED QString smbConfPath() const;
+#endif
 
 Q_SIGNALS:
     /**
diff --git a/staging/kio/src/widgets/paste.cpp b/staging/kio/src/widgets/paste.cpp
index 36da1e0..079a9da 100644
--- a/staging/kio/src/widgets/paste.cpp
+++ b/staging/kio/src/widgets/paste.cpp
@@ -235,6 +235,7 @@ static QStringList extractFormats(const QMimeData* mimeData)
     return formats;
 }
 
+#ifndef KDE_NO_DEPRECATED
 // The [old] main method for dropping
 KIO::CopyJob* KIO::pasteMimeSource( const QMimeData* mimeData, const QUrl& destUrl,
                                     const QString& dialogText, QWidget* widget, bool \
clipboard ) @@ -278,6 +279,7 @@ KIO::CopyJob* KIO::pasteMimeSource( const QMimeData* \
mimeData, const QUrl& destU  KJobWidgets::setWindow(job, widget);
     return job;
 }
+#endif
 
 KIOWIDGETS_EXPORT bool KIO::canPasteMimeSource(const QMimeData* data)
 {
diff --git a/staging/kio/src/widgets/paste.h b/staging/kio/src/widgets/paste.h
index 5cd488f..3f04685 100644
--- a/staging/kio/src/widgets/paste.h
+++ b/staging/kio/src/widgets/paste.h
@@ -102,9 +102,11 @@ namespace KIO {
    * Note that you'll have to tell the user in case of an error (no data to paste),
    * while pasteMimeSource did that.
    */
+#ifndef KDE_NO_DEPRECATED
   KIOWIDGETS_DEPRECATED_EXPORT CopyJob* pasteMimeSource( const QMimeData* data, \
                const QUrl& destURL,
                                        const QString& dialogText, QWidget* widget,
                                        bool clipboard = false );
+#endif
 
 
   /**
diff --git a/staging/kservice/src/plugin/kexportplugin.h \
b/staging/kservice/src/plugin/kexportplugin.h index 013557c..216923e 100644
--- a/staging/kservice/src/plugin/kexportplugin.h
+++ b/staging/kservice/src/plugin/kexportplugin.h
@@ -73,6 +73,7 @@ Q_EXTERN_C KSERVICE_EXPORT const quint32 kde_plugin_version = \
version;  #else
 #define Q_STANDARD_CALL
 
+#ifndef KDE_NO_DEPRECATED
 class KSERVICE_DEPRECATED_EXPORT K_EXPORT_PLUGIN_is_deprecated_see_KDE5PORTING
 {
 };
@@ -80,6 +81,7 @@ class KSERVICE_DEPRECATED_EXPORT \
K_EXPORT_PLUGIN_is_deprecated_see_KDE5PORTING  #define K_EXPORT_PLUGIN(factory) \
             K_EXPORT_PLUGIN_is_deprecated_see_KDE5PORTING dummy; \
             K_PLUGIN_VERIFICATION_DATA
+#endif
 
 #endif
 
diff --git a/staging/kservice/src/plugin/klibrary.cpp \
b/staging/kservice/src/plugin/klibrary.cpp index 4854116..845ff9d 100644
--- a/staging/kservice/src/plugin/klibrary.cpp
+++ b/staging/kservice/src/plugin/klibrary.cpp
@@ -151,6 +151,7 @@ static KPluginFactory *kde4Factory(KLibrary *lib)
     return factory;
 }
 
+#ifndef KDE_NO_DEPRECATED
 // deprecated
 KPluginFactory* KLibrary::factory(const char* factoryname)
 {
@@ -164,7 +165,7 @@ KPluginFactory* KLibrary::factory(const char* factoryname)
 
     return factory;
 }
-
+#endif
 
 
 void KLibrary::setFileName(const QString &name)
diff --git a/staging/kservice/src/plugin/klibrary.h \
b/staging/kservice/src/plugin/klibrary.h index a9571f3..8f3cf73 100644
--- a/staging/kservice/src/plugin/klibrary.h
+++ b/staging/kservice/src/plugin/klibrary.h
@@ -54,7 +54,9 @@ public:
      * @return The factory of the library if there is any, otherwise 0
      * @deprecated use KPluginLoader::factory
      */
+#ifndef KDE_NO_DEPRECATED
     KSERVICE_DEPRECATED KPluginFactory* factory( const char* factoryname = 0 );
+#endif
 
 
     void_function_ptr resolveFunction(const char *name)
diff --git a/staging/xmlgui/src/kmainwindow.cpp b/staging/xmlgui/src/kmainwindow.cpp
index 811b8ba..fbdb1b9 100644
--- a/staging/xmlgui/src/kmainwindow.cpp
+++ b/staging/xmlgui/src/kmainwindow.cpp
@@ -347,6 +347,7 @@ KMainWindow::~KMainWindow()
     delete k_ptr;
 }
 
+#ifndef KDE_NO_DEPRECATED
 QMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsThis )
 {
     K_D(KMainWindow);
@@ -374,6 +375,7 @@ QMenu* KMainWindow::customHelpMenu( bool showWhatsThis )
 
     return d->helpMenu->menu();
 }
+#endif
 
 bool KMainWindow::canBeRestored( int number )
 {
@@ -496,10 +498,6 @@ void KMainWindow::readGlobalProperties( KConfig*  )
 {
 }
 
-void KMainWindow::showAboutApplication()
-{
-}
-
 void KMainWindow::savePropertiesInternal( KConfig *config, int number )
 {
     K_D(KMainWindow);
diff --git a/staging/xmlgui/src/kmainwindow.h b/staging/xmlgui/src/kmainwindow.h
index cb115f6..9c67a7c 100644
--- a/staging/xmlgui/src/kmainwindow.h
+++ b/staging/xmlgui/src/kmainwindow.h
@@ -179,8 +179,10 @@ public:
      * @return A standard help menu.
      * @deprecated use KHelpMenu directly
      */
+#ifndef KDE_NO_DEPRECATED
     XMLGUI_DEPRECATED QMenu* helpMenu(const QString &aboutAppText = QString(),
                                    bool showWhatsThis = true );
+#endif
 
     /**
      * Returns the help menu. Creates a standard help menu if none exists yet.
@@ -205,7 +207,9 @@ public:
      * @return A standard help menu.
      * @deprecated use XMLGUI instead, or KHelpMenu directly
      */
+#ifndef KDE_NO_DEPRECATED
     XMLGUI_DEPRECATED QMenu* customHelpMenu( bool showWhatsThis = true );
+#endif
 
     /**
      * If the session did contain so high a number, @p true is returned,
@@ -630,7 +634,9 @@ protected Q_SLOTS:
     * \endcode
     * @deprecated use KHelpMenu
     */
-    virtual XMLGUI_DEPRECATED void showAboutApplication();
+#ifndef KDE_NO_DEPRECATED
+    virtual XMLGUI_DEPRECATED void showAboutApplication() {}
+#endif
 
    /**
     * This slot should only be called in case you reimplement closeEvent() and
diff --git a/tier1/karchive/src/kfilterdev.cpp b/tier1/karchive/src/kfilterdev.cpp
index ce9924d..acbd208 100644
--- a/tier1/karchive/src/kfilterdev.cpp
+++ b/tier1/karchive/src/kfilterdev.cpp
@@ -108,7 +108,7 @@ KCompressionDevice::CompressionType \
KFilterDev::compressionTypeForMimeType(const  return \
findCompressionTypeByMimeType(mimetype);  }
 
-
+#ifndef KDE_NO_DEPRECATED
 //static
 KCompressionDevice* KFilterDev::deviceForFile( const QString & fileName, const \
QString & mimetype,  bool forceFilter )
@@ -137,3 +137,5 @@ KCompressionDevice * KFilterDev::device( QIODevice* inDevice, \
                const QString & mi
     KCompressionDevice* device = new KCompressionDevice(inDevice, \
autoDeleteInDevice, type);  return device;
 }
+#endif
+
diff --git a/tier1/karchive/src/kfilterdev.h b/tier1/karchive/src/kfilterdev.h
index 4691974..7c5bee3 100644
--- a/tier1/karchive/src/kfilterdev.h
+++ b/tier1/karchive/src/kfilterdev.h
@@ -86,9 +86,11 @@ public:
      *         filter does not exist, the return value depends on @p forceFilter.
      *         The returned KCompressionDevice has to be deleted after using.
      */
+#ifndef KDE_NO_DEPRECATED
     KARCHIVE_DEPRECATED static KCompressionDevice* deviceForFile( const QString & \
                fileName,
                                                                   const QString & \
                mimetype = QString(),
                                                                   bool forceFilter = \
false ); +#endif
 
     /**
      * @deprecated Use KCompressionDevicea
@@ -116,8 +118,10 @@ public:
      * @param autoDeleteInDevice if true, @p inDevice will be deleted automatically
      * @return a KCompressionDevice that filters the original stream. Must be \
                deleted after using
      */
+#ifndef KDE_NO_DEPRECATED
     KARCHIVE_DEPRECATED static KCompressionDevice* device( QIODevice* inDevice, \
                const QString & mimetype,
                                                            bool autoDeleteInDevice = \
true ); +#endif
 };
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic