From 5333e9917d0c013b2fbeb841a2980f12c1a5ffe5 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 28 Feb 2015 03:27:54 +0000 Subject: [PATCH] generic: remove deprecated API --- dnssd/avahi-servicetypebrowser.cpp | 6 - dnssd/dummy-servicetypebrowser.cpp | 6 - dnssd/mdnsd-servicetypebrowser.cpp | 8 - dnssd/servicetypebrowser.h | 9 - interfaces/ktexteditor/ktexteditor.cpp | 10 - interfaces/ktexteditor/plugin.h | 16 - kdecore/config/kconfig.cpp | 14 - kdecore/config/kconfig.h | 27 -- kdecore/config/kconfigbackend.h | 3 - kdecore/config/kconfiggroup.cpp | 16 - kdecore/config/kconfiggroup.h | 19 - kdecore/config/kcoreconfigskeleton.cpp | 20 - kdecore/config/kcoreconfigskeleton.h | 26 -- kdecore/io/kdebug.h | 12 - kdecore/io/kurl.cpp | 88 ----- kdecore/io/kurl.h | 102 ----- kdecore/kernel/kstandarddirs.cpp | 14 - kdecore/kernel/kstandarddirs.h | 31 -- kdecore/kernel/ktoolinvocation.cpp | 29 -- kdecore/kernel/ktoolinvocation.h | 54 --- kdecore/localization/kcharsets.cpp | 12 - kdecore/localization/kcharsets.h | 11 - kdecore/localization/kencodingprober.cpp | 8 - kdecore/localization/kencodingprober.h | 3 - kdecore/network/ksslcertificatemanager.h | 11 - kdecore/services/kmimetype.cpp | 9 - kdecore/services/kmimetype.h | 14 - kdecore/services/kservice.cpp | 29 -- kdecore/services/kservice.h | 160 -------- kdecore/services/kservicegroup.cpp | 7 - kdecore/services/kservicegroup.h | 13 - kdecore/services/kservicetype.cpp | 8 - kdecore/services/kservicetype.h | 3 - kdecore/services/kservicetypetrader.h | 23 -- kdecore/sycoca/ksycoca.cpp | 15 - kdecore/sycoca/ksycoca.h | 28 -- kdecore/tests/kconfigtest.cpp | 15 - kdecore/tests/kurltest.cpp | 20 - kdecore/util/kgenericfactory.h | 362 ------------------ kdecore/util/klibloader.h | 265 ------------- kdecore/util/kpluginfactory.cpp | 60 --- kdecore/util/kpluginfactory.h | 33 -- kdecore/util/kpluginloader.cpp | 8 - kdecore/util/ksortablelist.h | 7 - kdecore/util/kuser.h | 3 - kdecore/util/kuser_unix.cpp | 5 - kded/kded.cpp | 13 - kdeui/actions/kaction.cpp | 16 - kdeui/actions/kaction.h | 18 - kdeui/actions/kactionmenu.cpp | 7 - kdeui/actions/kactionmenu.h | 16 - kdeui/actions/kstandardaction.h | 5 - kdeui/actions/ktoolbarpopupaction.cpp | 6 - kdeui/actions/ktoolbarpopupaction.h | 11 - kdeui/dialogs/kshortcutseditor.cpp | 12 - kdeui/dialogs/kshortcutseditor.h | 6 - kdeui/icons/kiconloader.cpp | 62 --- kdeui/icons/kiconloader.h | 68 ---- kdeui/icons/kicontheme.cpp | 2 - .../kcategorizedsortfilterproxymodel.cpp | 7 - .../kcategorizedsortfilterproxymodel.h | 3 - kdeui/itemviews/kcategorizedview.cpp | 20 - kdeui/itemviews/kcategorizedview.h | 20 - kdeui/itemviews/kwidgetitemdelegate.cpp | 9 - kdeui/itemviews/kwidgetitemdelegate.h | 4 - kdeui/kernel/kapplication.cpp | 31 -- kdeui/kernel/kapplication.h | 12 - kdeui/kernel/kglobalsettings.cpp | 29 -- kdeui/kernel/kglobalsettings.h | 11 - kdeui/kernel/kuniqueapplication.cpp | 6 - kdeui/kernel/kuniqueapplication.h | 7 - kdeui/shortcuts/kglobalaccel.cpp | 70 ---- kdeui/shortcuts/kglobalaccel.h | 75 ---- kdeui/tests/kglobalshortcuttest.cpp | 58 --- kdeui/tests/klineedit_unittest.cpp | 46 --- kdeui/tests/kxerrorhandlertest.cpp | 7 - kdeui/util/kguiitem.cpp | 16 - kdeui/util/kguiitem.h | 8 - kdeui/util/kxerrorhandler.cpp | 10 - kdeui/util/kxerrorhandler.h | 9 - kdeui/widgets/kcharselect.cpp | 7 - kdeui/widgets/kcharselect.h | 5 - kdeui/widgets/kcombobox.cpp | 7 - kdeui/widgets/kcombobox.h | 32 -- kdeui/widgets/kkeysequencewidget.cpp | 7 - kdeui/widgets/kkeysequencewidget.h | 10 - kdeui/widgets/klineedit.cpp | 18 - kdeui/widgets/klineedit.h | 45 --- kdeui/widgets/knuminput.cpp | 33 -- kdeui/widgets/knuminput.h | 68 ---- kdeui/widgets/kratingwidget.cpp | 24 -- kdeui/widgets/kratingwidget.h | 31 -- kdeui/widgets/kruler.cpp | 24 -- kdeui/widgets/kruler.h | 36 -- kdeui/widgets/kshortcutwidget.cpp | 7 - kdeui/widgets/kshortcutwidget.h | 10 - kdeui/widgets/ktabbar.cpp | 88 +---- kdeui/widgets/ktabbar.h | 118 ------ kdeui/widgets/ktabwidget.cpp | 80 ---- kdeui/widgets/ktabwidget.h | 135 ------- kdeui/widgets/ktoolbar.cpp | 38 -- kdeui/widgets/ktoolbar.h | 35 -- kdewebkit/kgraphicswebview.h | 3 - kdewebkit/kwebview.h | 3 - kdewebkit/kwebview_p.h | 6 - kfile/kurlnavigator.cpp | 82 ---- kfile/kurlnavigator.h | 75 ---- kinit/klauncher.cpp | 3 - kio/bookmarks/kbookmark.cc | 14 - kio/bookmarks/kbookmark.h | 6 - kio/kfile/kfilemetainfowidget.cpp | 18 - kio/kfile/kicondialog.cpp | 1 - kio/kfile/kpropertiesdialog.cpp | 6 - kio/kfile/kpropertiesdialog.h | 3 - kio/kfile/kurlrequester.cpp | 14 - kio/kfile/kurlrequester.h | 20 - kio/kio/accessmanager.cpp | 26 -- kio/kio/accessmanager.h | 36 -- kio/kio/global.cpp | 24 -- kio/kio/global.h | 3 - kio/kio/job.cpp | 47 --- kio/kio/job.h | 32 -- kio/kio/jobclasses.h | 12 - kio/kio/kdatatool.cpp | 30 -- kio/kio/kdatatool.h | 17 +- kio/kio/kdirmodel.cpp | 8 - kio/kio/kdirmodel.h | 8 - kio/kio/kfileitem.cpp | 203 ---------- kio/kio/kfileitem.h | 128 ------- kio/kio/kfilemetainfo.cpp | 12 - kio/kio/kfilemetainfo.h | 33 +- kio/kio/kfilemetainfoitem.cpp | 13 - kio/kio/kfilemetainfoitem_p.h | 8 - kio/kio/krun.cpp | 47 --- kio/kio/krun.h | 61 --- kio/kio/kurifilter.cpp | 24 -- kio/kio/kurifilter.h | 31 -- kio/kio/netaccess.cpp | 32 -- kio/kio/netaccess.h | 44 --- kio/kio/previewjob.cpp | 60 --- kio/kio/previewjob.h | 88 ----- kio/kio/scheduler.cpp | 16 - kio/kio/scheduler.h | 10 - kio/kssl/ksslcertdialog.cpp | 5 - kio/kssl/ksslcertdialog.h | 12 - kio/tests/kdirmodeltest_gui.cpp | 10 - kio/tests/kfileitemtest.cpp | 7 - kio/tests/ksycocatest.cpp | 13 - kio/tests/kurlrequestertest.cpp | 4 - kparts/browserrun.cpp | 27 -- kparts/browserrun.h | 34 -- kparts/componentfactory.h | 163 -------- kparts/mainwindow.cpp | 8 - kparts/mainwindow.h | 4 - kparts/part.cpp | 16 - kparts/part.h | 14 - kparts/plugin.cpp | 20 - kparts/plugin.h | 16 - kutils/kcmoduleloader.cpp | 24 -- kutils/kcmoduleloader.h | 11 - 160 files changed, 9 insertions(+), 4886 deletions(-) delete mode 100644 kdecore/util/kgenericfactory.h diff --git a/dnssd/avahi-servicetypebrowser.cpp b/dnssd/avahi-servicetypebrowser.cpp index 773a72b8..3b5caaca 100644 --- a/dnssd/avahi-servicetypebrowser.cpp +++ b/dnssd/avahi-servicetypebrowser.cpp @@ -89,12 +89,6 @@ QStringList ServiceTypeBrowser::serviceTypes() const return d->m_servicetypes; } -#ifndef KDE_NO_DEPRECATED -bool ServiceTypeBrowser::isRunning() const -{ - return d->m_started; -} -#endif } diff --git a/dnssd/dummy-servicetypebrowser.cpp b/dnssd/dummy-servicetypebrowser.cpp index 18895cb3..fa7c55fb 100644 --- a/dnssd/dummy-servicetypebrowser.cpp +++ b/dnssd/dummy-servicetypebrowser.cpp @@ -39,12 +39,6 @@ QStringList ServiceTypeBrowser::serviceTypes() const return QStringList(); } -#ifndef KDE_NO_DEPRECATED -bool ServiceTypeBrowser::isRunning() const -{ - return false; -} -#endif } #include "moc_servicetypebrowser.cpp" diff --git a/dnssd/mdnsd-servicetypebrowser.cpp b/dnssd/mdnsd-servicetypebrowser.cpp index 171bec36..a874f26a 100644 --- a/dnssd/mdnsd-servicetypebrowser.cpp +++ b/dnssd/mdnsd-servicetypebrowser.cpp @@ -49,14 +49,6 @@ void ServiceTypeBrowser::startBrowse() d->m_browser->startBrowse(); } -//@todo: remove on Monday -#ifndef KDE_NO_DEPRECATED -bool ServiceTypeBrowser::isRunning() const -{ - return false; -} -#endif - void ServiceTypeBrowserPrivate::newService(DNSSD::RemoteService::Ptr srv) { QString type=srv->serviceName()+'.'+srv->type(); diff --git a/dnssd/servicetypebrowser.h b/dnssd/servicetypebrowser.h index 78dc96ba..3f23759d 100644 --- a/dnssd/servicetypebrowser.h +++ b/dnssd/servicetypebrowser.h @@ -89,15 +89,6 @@ public: */ void startBrowse(); - /** - * @deprecated - * This method is unnecessary, since it is safe to call startBrowse() - * multiple times. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isRunning() const; -#endif - Q_SIGNALS: /** * Emitted when there are no more services of this type diff --git a/interfaces/ktexteditor/ktexteditor.cpp b/interfaces/ktexteditor/ktexteditor.cpp index 03d52743..ba64c1d1 100644 --- a/interfaces/ktexteditor/ktexteditor.cpp +++ b/interfaces/ktexteditor/ktexteditor.cpp @@ -143,16 +143,6 @@ bool View::insertText (const QString &text ) return doc->insertText(cursorPosition(),text,blockSelection()); } -#ifndef KDE_NO_DEPRECATED -Plugin *KTextEditor::createPlugin ( KService::Ptr service, QObject *parent ) -{ - QString error; - Plugin* plugin = service->createInstance(parent, QVariantList(), &error); - if (!plugin) - kWarning() << error; - return plugin; -} -#endif struct KTextEditorFactorySet : public QSet { diff --git a/interfaces/ktexteditor/plugin.h b/interfaces/ktexteditor/plugin.h index 38540ae3..793766c2 100644 --- a/interfaces/ktexteditor/plugin.h +++ b/interfaces/ktexteditor/plugin.h @@ -190,22 +190,6 @@ class KTEXTEDITOR_EXPORT Plugin : public QObject class PluginPrivate* const d; }; -/** - * Create a plugin represented by \p service with parent object \p parent. - * To get the KService object you usually use KServiceTypeTrader. Example - * \code - * KService::List list = KServiceTypeTrader::self()->query("KTextEditor/Plugin"); - * - * foreach(const KService::Ptr &service, list) { - * // do something with service - * } - * \endcode - * \return the plugin or NULL if it could not be loaded - */ -#ifndef KDE_NO_DEPRECATED -KTEXTEDITOR_EXPORT_DEPRECATED Plugin *createPlugin ( KService::Ptr service, QObject *parent ); -#endif - } #endif diff --git a/kdecore/config/kconfig.cpp b/kdecore/config/kconfig.cpp index 94a5a062..375f06c1 100644 --- a/kdecore/config/kconfig.cpp +++ b/kdecore/config/kconfig.cpp @@ -743,21 +743,7 @@ bool KConfig::isGroupImmutableImpl(const QByteArray& aGroup) const return isImmutable() || d->entryMap.getEntryOption(aGroup, 0, 0, KEntryMap::EntryImmutable); } -#ifndef KDE_NO_DEPRECATED -void KConfig::setForceGlobal(bool b) -{ - Q_D(KConfig); - d->bForceGlobal = b; -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KConfig::forceGlobal() const -{ - Q_D(const KConfig); - return d->bForceGlobal; -} -#endif KConfigGroup KConfig::groupImpl(const QByteArray &group) { diff --git a/kdecore/config/kconfig.h b/kdecore/config/kconfig.h index 7b7ff702..ab0e40f2 100644 --- a/kdecore/config/kconfig.h +++ b/kdecore/config/kconfig.h @@ -342,33 +342,6 @@ public: bool isImmutable() const; /// @} - /// @{ global - /** - * @deprecated - * - * Forces all following write-operations to be performed on @c kdeglobals, - * independent of the @c Global flag in writeEntry(). - * - * @param force true to force writing to kdeglobals - * @see forceGlobal - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setForceGlobal(bool force); -#endif - /** - * @deprecated - * - * Returns whether all entries are being written to @c kdeglobals. - * - * @return @c true if all entries are being written to @c kdeglobals - * @see setForceGlobal - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool forceGlobal() const; -#endif - /// @} - /// @reimp QStringList groupList() const; diff --git a/kdecore/config/kconfigbackend.h b/kdecore/config/kconfigbackend.h index e5cb3891..0f9c1200 100644 --- a/kdecore/config/kconfigbackend.h +++ b/kdecore/config/kconfigbackend.h @@ -29,9 +29,6 @@ #include #include #include -#ifndef KDE_NO_DEPRECATED -#include -#endif #include #include #include diff --git a/kdecore/config/kconfiggroup.cpp b/kdecore/config/kconfiggroup.cpp index fcc3ca89..3befd4ed 100644 --- a/kdecore/config/kconfiggroup.cpp +++ b/kdecore/config/kconfiggroup.cpp @@ -552,23 +552,7 @@ void KConfigGroup::deleteGroup(WriteConfigFlags flags) config()->deleteGroup(d->fullName(), flags); } -#ifndef KDE_NO_DEPRECATED -void KConfigGroup::changeGroup( const QString &group ) -{ - Q_ASSERT_X(isValid(), "KConfigGroup::changeGroup", "accessing an invalid group"); - d.detach(); - d->mName = group.toUtf8(); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KConfigGroup::changeGroup( const char *group ) -{ - Q_ASSERT_X(isValid(), "KConfigGroup::changeGroup", "accessing an invalid group"); - d.detach(); - d->mName = group; -} -#endif QString KConfigGroup::name() const { diff --git a/kdecore/config/kconfiggroup.h b/kdecore/config/kconfiggroup.h index 8eddfd5e..3b104f0a 100644 --- a/kdecore/config/kconfiggroup.h +++ b/kdecore/config/kconfiggroup.h @@ -143,25 +143,6 @@ public: */ const KConfig* config() const; - /** - * Changes the group of the object - * - * @deprecated - * Create another KConfigGroup from the parent of this group instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void changeGroup(const QString &group); -#endif - /** - * Overload for changeGroup(const QString&) - * - * @deprecated - * Create another KConfigGroup from the parent of this group instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void changeGroup(const char *group); -#endif - /** * Copies the entries in this group to another configuration object * diff --git a/kdecore/config/kcoreconfigskeleton.cpp b/kdecore/config/kcoreconfigskeleton.cpp index 87cc74ff..00a866cc 100644 --- a/kdecore/config/kcoreconfigskeleton.cpp +++ b/kdecore/config/kcoreconfigskeleton.cpp @@ -1195,16 +1195,6 @@ KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemLongLong( const Q return item; } -#ifndef KDE_NO_DEPRECATED -KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemInt64( - const QString& name, - qint64 &reference, - qint64 defaultValue, - const QString & key) -{ - return addItemLongLong(name, reference, defaultValue, key); -} -#endif KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemULongLong( const QString &name, quint64 &reference, quint64 defaultValue, const QString &key ) @@ -1216,16 +1206,6 @@ KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemULongLong( const return item; } -#ifndef KDE_NO_DEPRECATED -KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemUInt64( - const QString & name, - quint64 &reference, - quint64 defaultValue, - const QString & key) -{ - return addItemULongLong(name, reference, defaultValue, key); -} -#endif KCoreConfigSkeleton::ItemDouble *KCoreConfigSkeleton::addItemDouble( const QString &name, double &reference, double defaultValue, const QString &key ) diff --git a/kdecore/config/kcoreconfigskeleton.h b/kdecore/config/kcoreconfigskeleton.h index b041393d..8bb886f2 100644 --- a/kdecore/config/kcoreconfigskeleton.h +++ b/kdecore/config/kcoreconfigskeleton.h @@ -599,9 +599,6 @@ public: qint64 mMin; qint64 mMax; }; -#ifndef KDE_NO_DEPRECATED - typedef KDE_DEPRECATED ItemLongLong ItemInt64; -#endif /** * Class for handling enums. @@ -732,9 +729,6 @@ public: quint64 mMin; quint64 mMax; }; -#ifndef KDE_NO_DEPRECATED - typedef KDE_DEPRECATED ItemULongLong ItemUInt64; -#endif /** * Class for handling a floating point preference item. @@ -1171,16 +1165,6 @@ public: qint64 defaultValue = 0, const QString & key = QString()); - /** - * @deprecated - * Use addItemLongLong(). - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED ItemLongLong *addItemInt64( const QString& name, qint64 &reference, - qint64 defaultValue = 0, - const QString & key = QString()); -#endif - /** * Register an item of type quint64 * @@ -1196,16 +1180,6 @@ public: quint64 defaultValue = 0, const QString & key = QString()); - /** - * @deprecated - * Use addItemULongLong(). - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED ItemULongLong *addItemUInt64(const QString & name, quint64 &reference, - quint64 defaultValue = 0, - const QString & key = QString()); -#endif - /** * Register an item of type double. * diff --git a/kdecore/io/kdebug.h b/kdecore/io/kdebug.h index e99f5a8e..d2d24c91 100644 --- a/kdecore/io/kdebug.h +++ b/kdecore/io/kdebug.h @@ -219,18 +219,6 @@ class QObject; KDECORE_EXPORT QDebug operator<<(QDebug s, const KUrl &url); KDECORE_EXPORT QDebug operator<<(QDebug s, const KDateTime &time); -#ifndef KDE_NO_DEPRECATED -class KDE_DEPRECATED kndbgstream { }; -typedef QDebug kdbgstream; - -static inline KDE_DEPRECATED QDebug kdDebug(int area = KDE_DEFAULT_DEBUG_AREA) { return kDebug(area); } -static inline KDE_DEPRECATED QDebug kdWarning(int area = KDE_DEFAULT_DEBUG_AREA) { return kWarning(area); } -static inline KDE_DEPRECATED QDebug kdError(int area = KDE_DEFAULT_DEBUG_AREA) { return kError(area); } -static inline KDE_DEPRECATED QDebug kdFatal(int area = KDE_DEFAULT_DEBUG_AREA) { return kFatal(area); } -inline KDE_DEPRECATED QString kdBacktrace(int levels=-1) { return kBacktrace( levels ); } - -static inline KDE_DEPRECATED QDebug kndDebug() { return kDebugDevNull(); } -#endif class WrongSyntax {}; diff --git a/kdecore/io/kurl.cpp b/kdecore/io/kurl.cpp index 500dddc3..4e55db66 100644 --- a/kdecore/io/kurl.cpp +++ b/kdecore/io/kurl.cpp @@ -516,12 +516,6 @@ KUrl::operator QVariant() const return qVariantFromValue(*this); } -#ifndef KDE_NO_DEPRECATED -bool KUrl::cmp( const KUrl &u, bool ignore_trailing ) const -{ - return equals( u, ignore_trailing ? CompareWithoutTrailingSlash : EqualsOptions(0) ); -} -#endif bool KUrl::equals( const KUrl &_u, const EqualsOptions& options ) const { @@ -1446,89 +1440,7 @@ void KUrl::_setEncodedUrl(const QByteArray& url) setUrl(QString::fromUtf8(url), QUrl::TolerantMode); } -#ifndef KDE_NO_DEPRECATED -bool urlcmp( const QString& _url1, const QString& _url2 ) -{ - return QUrl( _url1, QUrl::TolerantMode ) == QUrl( _url2, QUrl::TolerantMode ); -#if 0 - // Both empty ? - if ( _url1.isEmpty() && _url2.isEmpty() ) - return true; - // Only one empty ? - if ( _url1.isEmpty() || _url2.isEmpty() ) - return false; - KUrl::List list1 = KUrl::split( _url1 ); - KUrl::List list2 = KUrl::split( _url2 ); - - // Malformed ? - if ( list1.isEmpty() || list2.isEmpty() ) - return false; - - return ( list1 == list2 ); -#endif -} -#endif - -#ifndef KDE_NO_DEPRECATED -bool urlcmp( const QString& _url1, const QString& _url2, const KUrl::EqualsOptions& _options ) -{ - // Both empty ? - if (_url1.isEmpty() && _url2.isEmpty()) - return true; - // Only one empty ? - if (_url1.isEmpty() || _url2.isEmpty()) - return false; - - KUrl u1(_url1); - KUrl u2(_url2); - return u1.equals(u2, _options); - -#if 0 // kde3 code that supported nested urls - - KUrl::List list1 = KUrl::split( _url1 ); - KUrl::List list2 = KUrl::split( _url2 ); - - // Malformed ? - if ( list1.isEmpty() || list2.isEmpty() ) - return false; - - int size = list1.count(); - if ( list2.count() != size ) - return false; - - if ( _ignore_ref ) - { - (*list1.begin()).setRef(QString()); - (*list2.begin()).setRef(QString()); - } - - KUrl::List::Iterator it1 = list1.begin(); - KUrl::List::Iterator it2 = list2.begin(); - for( ; it1 != list1.end() ; ++it1, ++it2 ) - if ( !(*it1).equals( *it2, _ignore_trailing ) ) - return false; - return true; -#endif -} -#endif - -// static -#ifndef KDE_NO_DEPRECATED -KUrl KUrl::fromPathOrUrl( const QString& text ) -{ - KUrl url; - if ( !text.isEmpty() ) - { - if (!QDir::isRelativePath(text) || text[0] == QLatin1Char('~')) - url.setPath( text ); - else - url = KUrl( text ); - } - - return url; -} -#endif static QString _relativePath(const QString &base_dir, const QString &path, bool &isParent) { diff --git a/kdecore/io/kurl.h b/kdecore/io/kurl.h index af34330d..550ca02d 100644 --- a/kdecore/io/kurl.h +++ b/kdecore/io/kurl.h @@ -883,22 +883,6 @@ public: */ operator QVariant() const; - /** - * The same as equals(), just with a less obvious name. - * Compares this url with @p u. - * @param u the URL to compare this one with. - * @param ignore_trailing set to true to ignore trailing '/' characters. - * @return True if both urls are the same. If at least one of the urls is invalid, - * false is returned. - * @see operator==. This function should be used if you want to - * ignore trailing '/' characters. - * @deprecated Use equals() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool cmp( const KUrl &u, bool ignore_trailing = false ) const; -#endif - - /** * Flags to be used in URL comparison functions like equals, or urlcmp */ @@ -1007,15 +991,6 @@ public: */ static KUrl fromPath( const QString& text ); - /** - * \deprecated - * Since KDE4 you can pass both urls and paths to the KUrl constructors. - * Use KUrl(text) instead. - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED KUrl fromPathOrUrl( const QString& text ); -#endif - /** * Creates a KUrl from a string, using the standard conventions for mime data * (drag-n-drop or copy-n-paste). @@ -1043,55 +1018,6 @@ public: const MetaDataMap& metaData = MetaDataMap(), MimeDataFlags flags = DefaultMimeDataFlags ) const; - /** - * Convert unicoded string to local encoding and use %-style - * encoding for all common delimiters / non-ascii characters. - * @param str String to encode (can be QString()). - * @return the encoded string - * - * @deprecated use QUrl::toPercentEncoding instead, but note that it - * returns a QByteArray and not a QString. Which makes sense since - * everything is 7 bit (ascii) after being percent-encoded. - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED QString encode_string(const QString &str) { - return QString::fromLatin1( QUrl::toPercentEncoding( str ).constData() ); //krazy:exclude=qclasses - } -#endif - - /** - * Convert unicoded string to local encoding and use %-style - * encoding for all common delimiters / non-ascii characters - * as well as the slash '/'. - * @param str String to encode - * - * @deprecated use QUrl::toPercentEncoding(str,"/") instead, but note that it - * returns a QByteArray and not a QString. Which makes sense since - * everything is 7 bit (ascii) after being percent-encoded. - * - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED QString encode_string_no_slash(const QString &str) { - return QString::fromLatin1( QUrl::toPercentEncoding( str, "/" ).constData() ); //krazy:exclude=qclasses - } -#endif - - /** - * Decode %-style encoding and convert from local encoding to unicode. - * Reverse of encode_string() - * @param str String to decode (can be QString()). - * - * @deprecated use QUrl::fromPercentEncoding(encodedURL) instead, but - * note that it takes a QByteArray and not a QString. Which makes sense since - * everything is 7 bit (ascii) when being percent-encoded. - * - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED QString decode_string(const QString &str) { - return QUrl::fromPercentEncoding( str.toLatin1() ); //krazy:exclude=qclasses - } -#endif - /** * Convenience function. @@ -1159,34 +1085,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(KUrl::DirectoryOptions) Q_DECLARE_METATYPE(KUrl) Q_DECLARE_METATYPE(KUrl::List) -/** - * \relates KUrl - * Compares URLs. They are parsed, split and compared. - * Two malformed URLs with the same string representation - * are nevertheless considered to be unequal. - * That means no malformed URL equals anything else. - * @deprecated use KUrl(_url1).equals(KUrl(_url2)) instead. - */ -#ifndef KDE_NO_DEPRECATED -KDECORE_EXPORT_DEPRECATED bool urlcmp( const QString& _url1, const QString& _url2 ); // KDE5: remove, KUrl::equals is better API -#endif - -/** - * \relates KUrl - * Compares URLs. They are parsed, split and compared. - * Two malformed URLs with the same string representation - * are nevertheless considered to be unequal. - * That means no malformed URL equals anything else. - * - * @param _url1 A reference URL - * @param _url2 A URL that will be compared with the reference URL - * @param options a set of KUrl::EqualsOption flags - * @deprecated use KUrl(_url1).equals(KUrl(_url2), options) instead. - */ -#ifndef KDE_NO_DEPRECATED -KDECORE_EXPORT_DEPRECATED bool urlcmp( const QString& _url1, const QString& _url2, const KUrl::EqualsOptions& options ); // KDE5: remove, KUrl::equals is better API -#endif - KDECORE_EXPORT uint qHash(const KUrl& kurl); #endif diff --git a/kdecore/kernel/kstandarddirs.cpp b/kdecore/kernel/kstandarddirs.cpp index 0f48ac62..64f2911c 100644 --- a/kdecore/kernel/kstandarddirs.cpp +++ b/kdecore/kernel/kstandarddirs.cpp @@ -371,14 +371,6 @@ QString KStandardDirs::kfsstnd_xdg_data_prefixes() return d->xdgdata_prefixes.join(QString(QLatin1Char(KPATH_SEPARATOR))); } -#ifndef KDE_NO_DEPRECATED -bool KStandardDirs::addResourceType( const char *type, - const QString& relativename, - bool priority ) -{ - return addResourceType( type, 0, relativename, priority); -} -#endif bool KStandardDirs::addResourceType( const char *type, const char *basetype, @@ -1222,12 +1214,6 @@ static void tokenize(QStringList& tokens, const QString& str, } } -#ifndef KDE_NO_DEPRECATED -QString KStandardDirs::kde_default(const char *type) -{ - return QString(QLatin1Char('%')) + QString::fromLatin1(type) + QLatin1Char('/'); -} -#endif QString KStandardDirs::saveLocation(const char *type, const QString& suffix, diff --git a/kdecore/kernel/kstandarddirs.h b/kdecore/kernel/kstandarddirs.h index c2b7b41d..1b962328 100644 --- a/kdecore/kernel/kstandarddirs.h +++ b/kdecore/kernel/kstandarddirs.h @@ -227,34 +227,6 @@ public: */ void addXdgDataPrefix( const QString& dir ); - /** - * Adds suffixes for types. - * - * You may add as many as you need, but it is advised that there - * is exactly one to make writing definite. - * All basic types are added by addKDEDefaults(), - * but for those you can add more relative paths as well. - * - * The later a suffix is added, the higher its priority. Note, that the - * suffix should end with / but doesn't have to start with one (as prefixes - * should end with one). So adding a suffix for app_pics would look - * like KGlobal::dirs()->addResourceType("app_pics", "data" ,"app/pics"); - * - * @param type Specifies a short descriptive string to access - * files of this type. - * @param relativename Specifies a directory relative to the root - * of the KFSSTND. - * @param priority if true, the directory is added before any other, - * otherwise after - * @return true if successful, false otherwise. - * - * @deprecated, use addResourceType(type, 0, relativename, priority) - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool addResourceType( const char *type, - const QString& relativename, bool priority = true ); -#endif - /** * Adds suffixes for types. * @@ -649,9 +621,6 @@ public: * @see locate() * @see locateLocal() */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED QString kde_default(const char *type); -#endif /** * @internal (for use by sycoca only) diff --git a/kdecore/kernel/ktoolinvocation.cpp b/kdecore/kernel/ktoolinvocation.cpp index a2a45add..317c1bee 100644 --- a/kdecore/kernel/ktoolinvocation.cpp +++ b/kdecore/kernel/ktoolinvocation.cpp @@ -139,36 +139,7 @@ int KToolInvocation::startServiceInternal(const char *_function, return reply.arguments().at(0).toInt(); } -#ifndef KDE_NO_DEPRECATED -int -KToolInvocation::startServiceByName( const QString& _name, const QString &URL, - QString *error, QString *serviceName, int *pid, - const QByteArray& startup_id, bool noWait ) -{ - if (!isMainThreadActive(error)) - return EINVAL; - QStringList URLs; - if (!URL.isEmpty()) - URLs.append(URL); - return self()->startServiceInternal("start_service_by_name", - _name, URLs, error, serviceName, pid, startup_id, noWait); -} -#endif - -#ifndef KDE_NO_DEPRECATED -int -KToolInvocation::startServiceByName( const QString& _name, const QStringList &URLs, - QString *error, QString *serviceName, int *pid, - const QByteArray& startup_id, bool noWait ) -{ - if (!isMainThreadActive(error)) - return EINVAL; - - return self()->startServiceInternal("start_service_by_name", - _name, URLs, error, serviceName, pid, startup_id, noWait); -} -#endif int KToolInvocation::startServiceByDesktopPath( const QString& _name, const QString &URL, diff --git a/kdecore/kernel/ktoolinvocation.h b/kdecore/kernel/ktoolinvocation.h index 6b01a408..f54e15fe 100644 --- a/kdecore/kernel/ktoolinvocation.h +++ b/kdecore/kernel/ktoolinvocation.h @@ -182,60 +182,6 @@ public: // replacements for setLaunchEnv and for "making sure kdeinit/klauncher is running". // (We could do the last two without waiting, of course). - /** - * Starts a service based on the (translated) name of the service. - * E.g. "Web Browser" - * - * @param _name the name of the service - * @param URL if not empty this URL is passed to the service - * @param error On failure, error contains a description of the error - * that occurred. If the pointer is 0, the argument will be - * ignored - * @param serviceName On success, serviceName contains the DCOP name - * under which this service is available. If empty, the service does - * not provide DCOP services. If the pointer is 0 the argument - * will be ignored - * @param pid On success, the process id of the new service will be written - * here. If the pointer is 0, the argument will be ignored. - * @param startup_id for app startup notification, "0" for none, - * "" ( empty string ) is the default - * @param noWait if set, the function does not wait till the service is running. - * @return an error code indicating success (== 0) or failure (> 0). - * @deprecated Use startServiceByDesktopName or startServiceByDesktopPath - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static int startServiceByName( const QString& _name, const QString &URL, - QString *error=0, QString *serviceName=0, int *pid=0, - const QByteArray &startup_id = QByteArray(), bool noWait = false ); -#endif - - /** - * Starts a service based on the (translated) name of the service. - * E.g. "Web Browser" - * - * @param _name the name of the service - * @param URLs if not empty these URLs will be passed to the service - * @param error On failure, @p error contains a description of the error - * that occurred. If the pointer is 0, the argument will be - * ignored - * @param serviceName On success, @p serviceName contains the DCOP name - * under which this service is available. If empty, the service does - * not provide DCOP services. If the pointer is 0 the argument - * will be ignored - * @param pid On success, the process id of the new service will be written - * here. If the pointer is 0, the argument will be ignored. - * @param startup_id for app startup notification, "0" for none, - * "" ( empty string ) is the default - * @param noWait if set, the function does not wait till the service is running. - * @return an error code indicating success (== 0) or failure (> 0). - * @deprecated Use startServiceByDesktopName or startServiceByDesktopPath - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static int startServiceByName( const QString& _name, const QStringList &URLs=QStringList(), - QString *error=0, QString *serviceName=0, int *pid=0, - const QByteArray &startup_id = QByteArray(), bool noWait = false ); -#endif - /** * Starts a service based on the desktop path of the service. * E.g. "Applications/konqueror.desktop" or "/home/user/bla/myfile.desktop" diff --git a/kdecore/localization/kcharsets.cpp b/kdecore/localization/kcharsets.cpp index 5b724327..b0da5980 100644 --- a/kdecore/localization/kcharsets.cpp +++ b/kdecore/localization/kcharsets.cpp @@ -614,18 +614,6 @@ QStringList KCharsets::availableEncodingNames() const return available; } -#ifndef KDE_NO_DEPRECATED -QString KCharsets::languageForEncoding( const QString &encoding ) const -{ - const char* lang = kcharsets_array_search( (const char*)language_for_encoding_string, - language_for_encoding_indices, - encoding.toUtf8().constData() ); - if ( lang ) - return i18nc( "@item Text character set", lang ); - else - return i18nc( "@item Text character set", "Other" ); -} -#endif QString KCharsets::descriptionForEncoding( const QString& encoding ) const { diff --git a/kdecore/localization/kcharsets.h b/kdecore/localization/kcharsets.h index 03f3254f..6b6cde64 100644 --- a/kdecore/localization/kcharsets.h +++ b/kdecore/localization/kcharsets.h @@ -137,17 +137,6 @@ public: */ QList encodingsByScript() const; - /** - * Returns the language the encoding is used for. - * @param encoding the encoding for the language - * @return the language of the encoding - * @deprecated Please use descriptionForEncoding instead. - * This function will be removed before KDE4 is released. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString languageForEncoding( const QString &encoding ) const; -#endif - /** * @brief Returns a long description for an encoding name. * @param encoding the encoding for the language diff --git a/kdecore/localization/kencodingprober.cpp b/kdecore/localization/kencodingprober.cpp index 24714228..e28ee862 100644 --- a/kdecore/localization/kencodingprober.cpp +++ b/kdecore/localization/kencodingprober.cpp @@ -194,14 +194,6 @@ KEncodingProber::ProberState KEncodingProber::state() const return d->proberState; } -//DEPRECATED, do *not* use -#ifndef KDE_NO_DEPRECATED -const char* KEncodingProber::encodingName() const -{ - return qstrdup(encoding().constData()); -} -#endif - QByteArray KEncodingProber::encoding() const { if (!d->prober) diff --git a/kdecore/localization/kencodingprober.h b/kdecore/localization/kencodingprober.h index 6837641d..67f5ceff 100644 --- a/kdecore/localization/kencodingprober.h +++ b/kdecore/localization/kencodingprober.h @@ -129,9 +129,6 @@ public: * @warning The returned string is allocated with strdup, so some memory is leaked with every call. * @deprecated Use encoding() instead, which returns a QByteArray. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED const char* encodingName() const; -#endif /** * @returns a QByteArray with the name of the best encoding it has guessed so far diff --git a/kdecore/network/ksslcertificatemanager.h b/kdecore/network/ksslcertificatemanager.h index 4942203d..b40f05a2 100644 --- a/kdecore/network/ksslcertificatemanager.h +++ b/kdecore/network/ksslcertificatemanager.h @@ -70,17 +70,6 @@ public: void clearRule(const QSslCertificate &cert, const QString &hostName); KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName) const; - // do not use, it does nothing! -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setRootCertificates(const QList &rootCertificates) - { Q_UNUSED(rootCertificates) } -#endif - // use caCertificates() instead -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QList rootCertificates() const - { return caCertificates(); } -#endif - QList caCertificates() const; static QList nonIgnorableErrors(const QList &); diff --git a/kdecore/services/kmimetype.cpp b/kdecore/services/kmimetype.cpp index 293e765b..73ae4137 100644 --- a/kdecore/services/kmimetype.cpp +++ b/kdecore/services/kmimetype.cpp @@ -504,15 +504,6 @@ QString KMimeType::comment( const KUrl &url) const return d->comment(url); } -#ifndef KDE_NO_DEPRECATED -QString KMimeType::parentMimeType() const -{ - const QStringList parents = parentMimeTypes(); - if (!parents.isEmpty()) - return parents.first(); - return QString(); -} -#endif bool KMimeTypePrivate::inherits(const QString& mime) const { diff --git a/kdecore/services/kmimetype.h b/kdecore/services/kmimetype.h index bc35bcf9..bfeea63d 100644 --- a/kdecore/services/kmimetype.h +++ b/kdecore/services/kmimetype.h @@ -318,20 +318,6 @@ public: /// Return true if this mimetype is the default mimetype bool isDefault() const; - /** - * If this mimetype is a subclass of another mimetype, - * return the name of the parent. - * - * @return the parent mime type, or QString() if not set - * - * @deprecated this method does not support multiple inheritance, - * which is actually part of the shared-mime-info standard. - * Use is(), parentMimeTypes(), or allParentMimeTypes() instead of parentMimeType() - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString parentMimeType() const; -#endif - /** * If this mimetype is a subclass of one or more other mimetypes, * return the list of those mimetypes. diff --git a/kdecore/services/kservice.cpp b/kdecore/services/kservice.cpp index 8e81929b..6bee35b7 100644 --- a/kdecore/services/kservice.cpp +++ b/kdecore/services/kservice.cpp @@ -442,14 +442,6 @@ bool KService::hasServiceType( const QString& serviceType ) const return false; } -#ifndef KDE_NO_DEPRECATED -bool KService::hasMimeType( const KServiceType* ptr ) const -{ - if (!ptr) return false; - - return hasMimeType(ptr->name()); -} -#endif bool KService::hasMimeType(const QString& mimeType) const { @@ -605,12 +597,6 @@ KService::List KService::allServices() return KServiceFactory::self()->allServices(); } -#ifndef KDE_NO_DEPRECATED -KService::Ptr KService::serviceByName( const QString& _name ) -{ - return KServiceFactory::self()->findServiceByName( _name ); -} -#endif KService::Ptr KService::serviceByDesktopPath( const QString& _name ) { @@ -835,13 +821,6 @@ bool KService::isApplication() const return d->m_strType == QLatin1String("Application"); } -#ifndef KDE_NO_DEPRECATED -QString KService::type() const -{ - Q_D(const KService); - return d->m_strType; -} -#endif QString KService::exec() const { @@ -878,14 +857,6 @@ bool KService::terminal() const return d->m_bTerminal; } -// KDE5: remove and port code to entryPath? -#ifndef KDE_NO_DEPRECATED -QString KService::desktopEntryPath() const -{ - return entryPath(); -} -#endif - QString KService::desktopEntryName() const { Q_D(const KService); diff --git a/kdecore/services/kservice.h b/kdecore/services/kservice.h index 66c16df0..d5deebb7 100644 --- a/kdecore/services/kservice.h +++ b/kdecore/services/kservice.h @@ -24,9 +24,6 @@ #include "kserviceaction.h" #include #include -#ifndef KDE_NO_DEPRECATED -#include -#endif #include #include #include @@ -98,15 +95,6 @@ public: */ bool isApplication() const; - /** - * Returns the type of the service. - * @return the type of the service ("Application" or "Service") - * @deprecated use isApplication() - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString type() const; -#endif - /** * Returns the executable. * @return the command that the service executes, @@ -156,24 +144,6 @@ public: */ QString username() const; - /** - * Returns the path to the location where the service desktop entry - * is stored. - * - * This is a relative path if the desktop entry was found in any - * of the locations pointed to by $KDEDIRS (e.g. "Internet/kppp.desktop") - * It is a full path if the desktop entry originates from another - * location. - * - * @deprecated use entryPath() instead - * - * @return the path of the service's desktop file, - * or QString() if not set - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString desktopEntryPath() const; -#endif - /** * Returns the filename of the service desktop entry without any * extension. E.g. "kppp" @@ -285,28 +255,6 @@ public: */ bool hasServiceType( const QString& serviceTypePtr ) const; - /** - * Checks whether the service supports this mime type - * @param mimeTypePtr The name of the mime type you are - * interested in determining whether this service supports. - * - * Note that if you only have the name of the mime type, you have to look it up - * with KMimeType::mimeType( mimetype ) and use .data() on the result (this is - * because KService doesn't know KMimeType for dependency reasons) - * - * Warning this method will fail to return true if this KService isn't from ksycoca - * (i.e. it was created with a full path or a KDesktopFile) *and* the mimetype - * isn't explicited listed in the .desktop file but a parent mimetype is. - * For this reason you should generally get KServices with KMimeTypeTrader - * or one of the KService::serviceBy methods. - * - * @return true if the mime type you specified is supported, otherwise false. - * @deprecated, use hasMimeType(QString) - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool hasMimeType( const KServiceType* mimeTypePtr ) const; -#endif - /** * Checks whether the service supports this mime type * @param mimeType The name of the mime type you are @@ -439,20 +387,6 @@ public: */ void setExec(const QString& exec); - /** - * Find a service by name, i.e. the translated Name field. Don't use this. - * Use serviceByDesktopPath or serviceByStorageId instead. - * - * @param _name the name to search - * @return a pointer to the requested service or 0 if the service is - * unknown. - * @em Very @em important: Don't store the result in a KService* ! - * @deprecated there is never a good reason to use this method. - */ -#ifndef KDE_NO_DEPRECATED - static Ptr serviceByName( const QString& _name ); // KDE5: remove -#endif - /** * Find a service based on its path as returned by entryPath(). * It's usually better to use serviceByStorageId() instead. @@ -583,100 +517,6 @@ public: return 0; } - /** - * @deprecated Use the non-static service->createInstance(parent, args, &error) - */ -#ifndef KDE_NO_DEPRECATED - template - static KDE_DEPRECATED T *createInstance(const KService::Ptr &service, QObject *parent = 0, - const QVariantList &args = QVariantList(), QString *error = 0) - { - return service->createInstance(parent, args, error); - } -#endif - - /** - * @deprecated Use the non-static service->createInstance(parent, args, &error) - * where args is a QVariantList rather than a QStringList - */ -#ifndef KDE_NO_DEPRECATED - template - static KDE_DEPRECATED T *createInstance( const KService::Ptr &service, - QObject *parent, - const QStringList &args, - int *error = 0 ) - { - const QString library = service->library(); - if ( library.isEmpty() ) { - if ( error ) - *error = KLibLoader::ErrServiceProvidesNoLibrary; - return 0; - } - - return KLibLoader::createInstance( library, parent, args, error ); - } -#endif - - /** - * This template allows to create a component from a list of services, - * usually coming from a trader query. You probably want to use KServiceTypeTrader instead. - * - * @deprecated Use KServiceTypeTrader::createInstanceFromQuery instead - * - * @param begin The start iterator to the service describing the library to open - * @param end The end iterator to the service describing the library to open - * @param parent The parent object (see QObject constructor) - * @param args A list of string arguments, passed to the factory and possibly - * to the component (see KLibFactory) - * @param error see KLibLoader - * @return A pointer to the newly created object or a null pointer if the - * factory was unable to create an object of the given type. - */ -#ifndef KDE_NO_DEPRECATED - template - static KDE_DEPRECATED T *createInstance(ServiceIterator begin, ServiceIterator end, QObject *parent = 0, - const QVariantList &args = QVariantList(), QString *error = 0) - { - for (; begin != end; ++begin) { - KService::Ptr service = *begin; - if (error) { - error->clear(); - } - - T *component = createInstance(service, parent, args, error); - if (component) { - return component; - } - } - if (error) { - *error = KLibLoader::errorString(KLibLoader::ErrNoServiceFound); - } - return 0; - } -#endif - -#ifndef KDE_NO_DEPRECATED - template - static KDE_DEPRECATED T *createInstance( ServiceIterator begin, ServiceIterator end, - QObject *parent, - const QStringList &args, - int *error = 0 ) - { - for (; begin != end; ++begin ) { - KService::Ptr service = *begin; - if ( error ) - *error = 0; - - T *component = createInstance( service, parent, args, error ); - if ( component ) - return component; - } - if ( error ) - *error = KLibLoader::ErrNoServiceFound; - return 0; - } -#endif - protected: friend class KMimeAssociations; friend class KBuildServiceFactory; diff --git a/kdecore/services/kservicegroup.cpp b/kdecore/services/kservicegroup.cpp index 08bc587b..c4826307 100644 --- a/kdecore/services/kservicegroup.cpp +++ b/kdecore/services/kservicegroup.cpp @@ -700,13 +700,6 @@ QStringList KServiceGroup::layoutInfo() const return d->sortOrder; } -#ifndef KDE_NO_DEPRECATED -KServiceGroup::Ptr -KServiceGroup::baseGroup( const QString & _baseGroupName ) -{ - return KServiceGroupFactory::self()->findBaseGroup(_baseGroupName, true); -} -#endif KServiceGroup::Ptr KServiceGroup::root() diff --git a/kdecore/services/kservicegroup.h b/kdecore/services/kservicegroup.h index 9fdf2b0e..7b4af6e8 100644 --- a/kdecore/services/kservicegroup.h +++ b/kdecore/services/kservicegroup.h @@ -240,19 +240,6 @@ public: */ QString directoryEntryPath() const; - /** - * Returns the group for the given baseGroupName. - * Can return 0L if the directory (or the .directory file) was deleted. - * @return the base group with the given name, or 0 if not available. - * - * This mechanism was fragile and isn't used in kde4 anymore. - * @deprecated Use a servicetype and a proper trader query instead, for a better - * way of finding related services. - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED Ptr baseGroup( const QString &baseGroupName ); -#endif - /** * Returns the root service group. * @return the root service group diff --git a/kdecore/services/kservicetype.cpp b/kdecore/services/kservicetype.cpp index 61cb30b0..60eed378 100644 --- a/kdecore/services/kservicetype.cpp +++ b/kdecore/services/kservicetype.cpp @@ -235,14 +235,6 @@ QString KServiceType::comment() const return d->comment(); } -// ## KDE4: remove? -#ifndef KDE_NO_DEPRECATED -QString KServiceType::desktopEntryPath() const -{ - return entryPath(); -} -#endif - bool KServiceType::isDerived() const { Q_D(const KServiceType); diff --git a/kdecore/services/kservicetype.h b/kdecore/services/kservicetype.h index ebee1aae..15fcdc4b 100644 --- a/kdecore/services/kservicetype.h +++ b/kdecore/services/kservicetype.h @@ -72,9 +72,6 @@ public: * For instance inode/directory.desktop, or kpart.desktop * @return the path of the desktop file */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString desktopEntryPath() const; -#endif /** * Checks whether this service type inherits another one. diff --git a/kdecore/services/kservicetypetrader.h b/kdecore/services/kservicetypetrader.h index 5a2f75c4..e2b258dc 100644 --- a/kdecore/services/kservicetypetrader.h +++ b/kdecore/services/kservicetypetrader.h @@ -193,29 +193,6 @@ public: return 0; } - /** - * @deprecated Use - * createInstanceFromQuery(const QString&, const QString&, QObject*, const QVariantList&, QString*) - * instead - */ -#ifndef KDE_NO_DEPRECATED - template - static KDE_DEPRECATED T *createInstanceFromQuery(const QString &serviceType, const QString &constraint, - QObject *parent, const QStringList &args, int *error = 0) - { - const KService::List offers = KServiceTypeTrader::self()->query(serviceType, constraint); - if (offers.isEmpty()) { - if (error) { - *error = KLibLoader::ErrNoServiceFound; - } - return 0; - } - - return KService::createInstance(offers.begin(), offers.end(), parent, args, error); - } -#endif - - /** * @internal (public for KMimeTypeTrader) */ diff --git a/kdecore/sycoca/ksycoca.cpp b/kdecore/sycoca/ksycoca.cpp index 66a2b2a4..700f8a31 100644 --- a/kdecore/sycoca/ksycoca.cpp +++ b/kdecore/sycoca/ksycoca.cpp @@ -332,12 +332,6 @@ void KSycoca::addFactory( KSycocaFactory *factory ) d->addFactory(factory); } -#ifndef KDE_NO_DEPRECATED -bool KSycoca::isChanged(const char *type) -{ - return self()->d->changeList.contains(QString::fromLatin1(type)); -} -#endif void KSycoca::notifyDatabaseChanged(const QStringList &changeList) { @@ -350,9 +344,6 @@ void KSycoca::notifyDatabaseChanged(const QStringList &changeList) d->closeDatabase(); // Now notify applications -#ifndef KDE_NO_DEPRECATED - emit databaseChanged(); -#endif emit databaseChanged(changeList); } @@ -562,12 +553,6 @@ void KSycoca::flagError() } } -#ifndef KDE_NO_DEPRECATED -bool KSycoca::readError() // KDE5: remove -{ - return false; -} -#endif bool KSycoca::isBuilding() { diff --git a/kdecore/sycoca/ksycoca.h b/kdecore/sycoca/ksycoca.h index 1067d708..d53aa998 100644 --- a/kdecore/sycoca/ksycoca.h +++ b/kdecore/sycoca/ksycoca.h @@ -153,38 +153,13 @@ public: */ static void disableAutoRebuild(); - /** - * When you receive a "databaseChanged" signal, you can query here if - * a change has occurred in a specific resource type. - * @see KStandardDirs for the various resource types. - * - * This method is meant to be called from the GUI thread only. - * @deprecated use the signal databaseChanged(QStringList) instead. - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool isChanged(const char *type); -#endif - /** * A read error occurs. * @internal */ static void flagError(); - /// @deprecated -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool readError(); -#endif - Q_SIGNALS: - /** - * Connect to this to get notified when the database changes - * @deprecated use the databaseChanged(QStringList) signal - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void databaseChanged(); // KDE5 TODO: remove -#endif - /** * Connect to this to get notified when the database changes * Example: when mimetype definitions have changed, applications showing @@ -203,9 +178,6 @@ protected: KSycocaFactoryList* factories(); // @internal was for kbuildsycoca -#ifndef KDE_NO_DEPRECATED - QDataStream *m_str_deprecated; // KDE5: REMOVE -#endif // @internal used by factories and kbuildsycoca QDataStream*& stream(); friend class KSycocaFactory; diff --git a/kdecore/tests/kconfigtest.cpp b/kdecore/tests/kconfigtest.cpp index 7f75382b..27d962ce 100644 --- a/kdecore/tests/kconfigtest.cpp +++ b/kdecore/tests/kconfigtest.cpp @@ -642,27 +642,12 @@ void KConfigTest::testChangeGroup() KConfigGroup sc3(&sc, "Hello"); QCOMPARE(sc3.name(), QString("Hello")); KConfigGroup newGroup(sc3); -#ifndef KDE_NO_DEPRECATED - newGroup.changeGroup("FooBar"); // deprecated! - QCOMPARE(newGroup.name(), QString("FooBar")); - QCOMPARE(sc3.name(), QString("Hello")); // unchanged - - // Write into the "changed group" and check that it works - newGroup.writeEntry("InFooBar", "FB"); - QCOMPARE(KConfigGroup(&sc, "FooBar").entryMap().value("InFooBar"), QString("FB")); - QCOMPARE(KConfigGroup(&sc, "Hello").entryMap().value("InFooBar"), QString()); -#endif KConfigGroup rootGroup(sc.group("")); QCOMPARE(rootGroup.name(), QString("")); KConfigGroup sc32(rootGroup.group("Hello")); QCOMPARE(sc32.name(), QString("Hello")); KConfigGroup newGroup2(sc32); -#ifndef KDE_NO_DEPRECATED - newGroup2.changeGroup("FooBar"); // deprecated! - QCOMPARE(newGroup2.name(), QString("FooBar")); - QCOMPARE(sc32.name(), QString("Hello")); // unchanged -#endif } // Simple test for deleteEntry diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp index aafc7611..5da1aaf3 100644 --- a/kdecore/tests/kurltest.cpp +++ b/kdecore/tests/kurltest.cpp @@ -1415,10 +1415,6 @@ void KUrlTest::testComparisons() QString ucmp1 = "ftp://ftp.de.kde.org/dir"; QString ucmp2 = "ftp://ftp.de.kde.org/dir/"; -#ifndef KDE_NO_DEPRECATED - QVERIFY(!urlcmp(ucmp1, ucmp2)); - QVERIFY(urlcmp(ucmp1, ucmp2, KUrl::CompareWithoutTrailingSlash)); //only slash difference, ignore_trailing -#endif { KUrl u1(ucmp1); @@ -1432,11 +1428,6 @@ void KUrlTest::testComparisons() { QString str1 = QString::fromLatin1( "ftp://ftp.de.kde.org" ); QString str2 = QString::fromLatin1( "ftp://ftp.de.kde.org/" ); -#ifndef KDE_NO_DEPRECATED - QVERIFY(!urlcmp(str1, str2)); - QVERIFY(!urlcmp(str1, str2, KUrl::CompareWithoutTrailingSlash)); // empty path != '/' - QVERIFY(urlcmp(str1, str2, KUrl::CompareWithoutTrailingSlash|KUrl::AllowEmptyPath)); -#endif KUrl u1(str1); KUrl u2(str2); QVERIFY(!u1.equals(u2)); @@ -1445,17 +1436,6 @@ void KUrlTest::testComparisons() } QString ucmp3 = "ftp://ftp.de.kde.org/dir/#"; -#ifndef KDE_NO_DEPRECATED - QVERIFY( !urlcmp(ucmp2,ucmp3) ); // (only hash difference) - QVERIFY( urlcmp(ucmp2,ucmp3,KUrl::CompareWithoutFragment) ); // (only hash difference, ignore_ref) - QVERIFY( urlcmp(ucmp2,ucmp3,KUrl::CompareWithoutTrailingSlash | KUrl::CompareWithoutFragment) ); // (slash and hash difference, ignore_trailing, ignore_ref) - QVERIFY( urlcmp("","",KUrl::CompareWithoutFragment) ); // (empty, empty) - QVERIFY( urlcmp("","") ); // (empty, empty) - QVERIFY( !urlcmp("",ucmp1) ); // (empty, not empty) - QVERIFY( !urlcmp("",ucmp1,KUrl::CompareWithoutFragment) ); // (empty, not empty) - QVERIFY( !urlcmp("file",ucmp1) ); // (malformed, not empty) - QVERIFY( !urlcmp("file",ucmp1,KUrl::CompareWithoutFragment) ); // (malformed, not empty) -#endif KUrl ftpUrl( "ftp://ftp.de.kde.org" ); QCOMPARE( ftpUrl.path(), QString()); diff --git a/kdecore/util/kgenericfactory.h b/kdecore/util/kgenericfactory.h deleted file mode 100644 index 96fd58ac..00000000 --- a/kdecore/util/kgenericfactory.h +++ /dev/null @@ -1,362 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2001 Simon Hausmann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#ifndef kgenericfactory_h -#define kgenericfactory_h - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef KDE_NO_DEPRECATED - -/* @internal */ -template -class KGenericFactoryBase : public KPluginFactory -{ -public: - explicit KGenericFactoryBase(const char *componentName, const char *catalogName) - : KPluginFactory(componentName, catalogName) - { - s_self = this; - s_createComponentDataCalled = false; - } - - explicit KGenericFactoryBase( const KAboutData *data ) - : KPluginFactory(data) - { - s_self = this; - s_createComponentDataCalled = false; - } - - virtual ~KGenericFactoryBase() - { - s_self = 0; - } - - static KComponentData componentData() - { - Q_ASSERT(s_self); - if (!s_createComponentDataCalled) { - s_createComponentDataCalled = true; - - KComponentData *kcd = s_self->createComponentData(); - Q_ASSERT(kcd); - s_self->setComponentData(*kcd); - delete kcd; - } - return static_cast(s_self)->componentData(); - } - -protected: - virtual KComponentData *createComponentData() - { - return new KComponentData(componentData()); - } - -private: - static bool s_createComponentDataCalled; - static KGenericFactoryBase *s_self; -}; - -/* @internal */ -template -KGenericFactoryBase *KGenericFactoryBase::s_self = 0; - -/* @internal */ -template -bool KGenericFactoryBase::s_createComponentDataCalled = false; - -/** - * This template provides a generic implementation of a KLibFactory , - * for use with shared library components. It implements the pure virtual - * createObject method of KLibFactory and instantiates objects of the - * specified class (template argument) when the class name argument of - * createObject matches a class name in the given hierarchy. - * - * In case you are developing a KParts component, skip this file and - * go directly to KParts::GenericFactory . - * - * Note that the class specified as template argument needs to provide - * a certain constructor: - *
    - *
  • If the class is derived from QObject then it needs to have - * a constructor like: - * MyClass( QObject *parent, - * const QStringList &args ); - *
  • If the class is derived from QWidget then it needs to have - * a constructor like: - * MyWidget( QWidget *parent, - * const QStringList &args); - *
  • If the class is derived from KParts::Part then it needs to have - * a constructor like: - * MyPart( QWidget *parentWidget, - * QObject *parent, - * const QStringList &args ); - *
- * The args QStringList passed to the constructor is the args string list - * that the caller passed to KLibFactory's create method. - * - * In addition upon instantiation this template provides a central - * KComponentData object for your component, accessible through the - * static componentData() method. The componentName and catalogName arguments - * of the KGenericFactory constructor are passed to the KComponentData object. - * - * The creation of the KComponentData object can be customized by inheriting - * from this template class and re-implementing the virtual createComponentData - * method. For example it could look like this: - * \code - * KComponentData *MyFactory::createComponentData() - * { - * return new KComponentData( myAboutData ); - * } - * \endcode - * - * Example of usage of the whole template: - * \code - * class MyPlugin : public KParts::Plugin - * { - * Q_ OBJECT - * public: - * MyPlugin( QObject *parent, const QStringList &args ); - * ... - * }; - * - * K_EXPORT_COMPONENT_FACTORY( libmyplugin, KGenericFactory ) - * \endcode - * - * @deprecated use KPluginFactory - */ -template -class KDE_DEPRECATED KGenericFactory : public KGenericFactoryBase -{ -public: - explicit KGenericFactory( const char *componentName = 0, const char *catalogName = 0 ) - : KGenericFactoryBase(componentName, catalogName) - {} - - explicit KGenericFactory( const KAboutData *data ) - : KGenericFactoryBase(data) - {} - -protected: - virtual QObject *createObject( QObject *parent, - const char *className, const QStringList &args ) - { - return KDEPrivate::ConcreteFactory - ::create( 0, parent, className, args ); - } -}; - -/** - * \class KGenericFactory kgenericfactory.h - * - * This template provides a generic implementation of a KLibFactory , - * for use with shared library components. It implements the pure virtual - * createObject method of KLibFactory and instantiates objects of the - * specified classes in the given typelist template argument when the class - * name argument of createObject matches a class names in the given hierarchy - * of classes. - * - * Note that each class in the specified in the typelist template argument - * needs to provide a certain constructor: - *
    - *
  • If the class is derived from QObject then it needs to have - * a constructor like: - * MyClass( QObject *parent, - * const QStringList &args ); - *
  • If the class is derived from QWidget then it needs to have - * a constructor like: - * MyWidget( QWidget *parent, - * const QStringList &args); - *
  • If the class is derived from KParts::Part then it needs to have - * a constructor like: - * MyPart( QWidget *parentWidget, - * QObject *parent, - * const QStringList &args ); - *
- * The args QStringList passed to the constructor is the args string list - * that the caller passed to KLibFactory's create method. - * - * In addition upon instantiation this template provides a central - * KComponentData object for your component, accessible through the - * static componentData() method. The componentName and catalogName arguments - * of the KGenericFactory constructor are passed to the KComponentData object. - * - * The creation of the KComponentData object can be customized by inheriting - * from this template class and re-implementing the virtual createComponentData - * method. For example it could look like this: - * \code - * KComponentData *MyFactory::createComponentData() - * { - * return new KComponentData( myAboutData ); - * } - * \endcode - * - * Example of usage of the whole template: - * \code - * class MyPlugin : public KParts::Plugin - * { - * Q_ OBJECT - * public: - * MyPlugin( QObject *parent, - * const QStringList &args ); - * ... - * }; - * - * class MyDialogComponent : public KDialog - * { - * Q_ OBJECT - * public: - * MyDialogComponent( QWidget *parentWidget, - * const QStringList &args ); - * ... - * }; - * - * typedef K_TYPELIST_2( MyPlugin, MyDialogComponent ) Products; - * K_EXPORT_COMPONENT_FACTORY( libmyplugin, KGenericFactory ) - * \endcode - */ -template -class KGenericFactory< KTypeList, QObject > - : public KGenericFactoryBase > -{ -public: - explicit KGenericFactory( const char *componentName = 0, const char *catalogName = 0 ) - : KGenericFactoryBase >(componentName, catalogName) - {} - - explicit KGenericFactory( const KAboutData *data ) - : KGenericFactoryBase >(data) - {} - - -protected: - virtual QObject *createObject( QObject *parent, - const char *className, const QStringList &args ) - { - return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail > > - ::create( 0, parent, className, args ); - } -}; - -/** - * \class KGenericFactory kgenericfactory.h - * - * This template provides a generic implementation of a KLibFactory , - * for use with shared library components. It implements the pure virtual - * createObject method of KLibFactory and instantiates objects of the - * specified classes in the given typelist template argument when the class - * name argument of createObject matches a class names in the given hierarchy - * of classes. - * - * Note that each class in the specified in the typelist template argument - * needs to provide a certain constructor: - *
    - *
  • If the class is derived from QObject then it needs to have - * a constructor like: - * MyClass( QObject *parent, - * const QStringList &args ); - *
  • If the class is derived from QWidget then it needs to have - * a constructor like: - * MyWidget( QWidget *parent, - * const QStringList &args); - *
  • If the class is derived from KParts::Part then it needs to have - * a constructor like: - * MyPart( QWidget *parentWidget, - * QObject *parent, - * const QStringList &args ); - *
- * The args QStringList passed to the constructor is the args string list - * that the caller passed to KLibFactory's create method. - * - * In addition upon instantiation this template provides a central - * KComponentData object for your component, accessible through the - * static componentData() method. The componentName and catalogNames arguments - * of the KGenericFactory constructor are passed to the KComponentData object. - * - * The creation of the KComponentData object can be customized by inheriting - * from this template class and re-implementing the virtual createComponentData - * method. For example it could look like this: - * \code - * KComponentData *MyFactory::createComponentData() - * { - * return new KComponentData( myAboutData ); - * } - * \endcode - * - * Example of usage of the whole template: - * \code - * class MyPlugin : public KParts::Plugin - * { - * Q_ OBJECT - * public: - * MyPlugin( QObject *parent, - * const QStringList &args ); - * ... - * }; - * - * class MyDialogComponent : public KDialog - * { - * Q_ OBJECT - * public: - * MyDialogComponent( QWidget *parentWidget, - * const QStringList &args ); - * ... - * }; - * - * typedef K_TYPELIST_2( MyPlugin, MyDialogComponent ) Products; - * K_EXPORT_COMPONENT_FACTORY( libmyplugin, KGenericFactory ) - * \endcode - */ -template -class KGenericFactory< KTypeList, - KTypeList > - : public KGenericFactoryBase > -{ -public: - explicit KGenericFactory( const char *componentName = 0, const char *catalogName = 0 ) - : KGenericFactoryBase >(componentName, catalogName) - {} - explicit KGenericFactory( const KAboutData *data ) - : KGenericFactoryBase >(data) - {} - - -protected: - virtual QObject *createObject( QObject *parent, - const char *className, const QStringList &args ) - { - return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail >, - KTypeList< ParentType, ParentTypeListTail > > - ::create( 0, 0, parent, - className, args ); - } -}; - -#endif -#endif - - diff --git a/kdecore/util/klibloader.h b/kdecore/util/klibloader.h index 146cc8b1..b40b9016 100644 --- a/kdecore/util/klibloader.h +++ b/kdecore/util/klibloader.h @@ -30,269 +30,4 @@ #include "kpluginloader.h" #include "klibrary.h" -#ifndef KDE_NO_DEPRECATED - -# define K_EXPORT_COMPONENT_FACTORY( libname, factory ) \ - extern "C" { KDE_EXPORT KPluginFactory *init_##libname() { return new factory; } } - -/** - * \class KLibLoader klibloader.h - * - * The KLibLoader allows you to load libraries dynamically at runtime. - * Dependent libraries are loaded automatically. - * - * KLibLoader follows the singleton pattern. You can not create multiple - * instances. Use self() to get a pointer to the loader. - * - * @deprecated You have two other possibilites: - * - KPluginLoader or KService::createInstance for plugins - * - KLibrary for other libraries - * - * @see KLibrary - * @see KPluginLoader - * @author Torben Weis - */ -class KDECORE_EXPORT KLibLoader : public QObject //krazy:exclude=dpointer (private class is kept as a global static) -{ - friend class KLibrary; - friend class KLibraryPrivate; - friend class KLibLoaderPrivate; - - Q_OBJECT -public: - /** - * Loads and initializes a library. Loading a library multiple times is - * handled gracefully. - * - * This is a convenience function that returns the factory immediately - * @param libname This is the library name without extension. Usually that is something like - * "libkspread". The function will then search for a file named - * "libkspread.la" in the KDE library paths. - * The *.la files are created by libtool and contain - * important information especially about the libraries dependencies - * on other shared libs. Loading a "libfoo.so" could not solve the - * dependencies problem. - * - * You can, however, give a library name ending in ".so" - * (or whatever is used on your platform), and the library - * will be loaded without resolving dependencies. Use with caution. - * @param loadHint provides more control over how the library is loaded - * @return the KPluginFactory, or 0 if the library does not exist or it does - * not have a factory - * @see library - */ - KPluginFactory* factory( const QString &libname, QLibrary::LoadHints loadHint = 0); - - /** - * Loads and initializes a library. Loading a library multiple times is - * handled gracefully. - * - * @param libname This is the library name without extension. Usually that is something like - * "libkspread". The function will then search for a file named - * "libkspread.la" in the KDE library paths. - * The *.la files are created by libtool and contain - * important information especially about the libraries dependencies - * on other shared libs. Loading a "libfoo.so" could not solve the - * dependencies problem. - * - * You can, however, give a library name ending in ".so" - * (or whatever is used on your platform), and the library - * will be loaded without resolving dependencies. Use with caution. - * @param loadHint provides more control over how the library is loaded - * @return KLibrary is invalid (0) when the library couldn't be dlopened. in such - * a case you can retrieve the error message by calling KLibLoader::lastErrorMessage() - * - * @see factory - */ - KLibrary* library( const QString &libname, QLibrary::LoadHints loadHint = 0 ); - - /** - * Returns an error message that can be useful to debug the problem. - * Returns QString() if the last call to library() was successful. - * You can call this function more than once. The error message is only - * reset by a new call to library(). - * @return the last error message, or QString() if there was no error - */ - QString lastErrorMessage() const; - - /** - * Unloads the library with the given name. - * @param libname This is the library name without extension. Usually that is something like - * "libkspread". The function will then search for a file named - * "libkspread.la" in the KDE library paths. - * The *.la files are created by libtool and contain - * important information especially about the libraries dependencies - * on other shared libs. Loading a "libfoo.so" could not solve the - * dependencies problem. - * - * You can, however, give a library name ending in ".so" - * (or whatever is used on your platform), and the library - * will be loaded without resolving dependencies. Use with caution. - */ - void unloadLibrary( const QString &libname ); - - /** - * Returns a pointer to the factory. - * - * Use this function to get an instance of KLibLoader. - * - * @return a pointer to the loader. If no loader exists until now - * then one is created. - * - * @deprecated use KPluginLoader instead - */ - static KDE_DEPRECATED KLibLoader* self(); - - /** - * Helper method which looks for a library in the standard paths - * ("module" and "lib" resources). - * Made public for code that doesn't use KLibLoader itself, but still - * wants to open modules. - * @param libname of the library. If it is not a path, the function searches in - * the "module" and "lib" resources. If there is no extension, - * ".la" will be appended. - * @param cData a KComponentData used to get the standard paths - * @return the name of the library if it was found, an empty string otherwise - */ - static QString findLibrary(const QString &libname, const KComponentData &cData = KGlobal::mainComponent()); - - /** - * This enum type defines the possible error cases that can happen - * when loading a component. - * - * Use errorString() to convert the error code to a human-readable string - */ - enum ComponentLoadingError { - ErrNoLibrary = 1, /*< the specified library could not be loaded. Use KLibLoader::lastErrorMessage for details*/ - ErrNoFactory, /*< the library does not export a factory */ - ErrNoComponent, /*< the factory does not support creating components of the specified type */ - ErrServiceProvidesNoLibrary, /*< the specified service provides no shared library (when using KService) */ - ErrNoServiceFound /*< no service implementing the given servicetype and fullfilling the given constraint expression can be found (when using KServiceTypeTrader) */ - }; - - /** - * Converts a numerical error code into a human-readable error message - * - * @param componentLoadingError the error code, as set using the @p error - * parameter of createInstance() - * @return the translated error message describing the error represented - * by @p componentLoadingError - * - * @see ComponentLoadingError - */ - static QString errorString( int componentLoadingError ); - - - /** - * This template allows to load the specified library and ask the - * factory to create an instance of the given template type. - * - * @param keyword the keyword for the plugin - see KPluginFactory::registerPlugin() - * @param libname the library to open - * @param parent the parent object (see QObject constructor) - * @param args a list of string arguments, passed to the factory and possibly - * to the component (see KPluginFactory) - * @param error if not null, the int will be set to 0 on success or one of the - * error codes defined by ComponentLoadingError if there was an error - * @return a pointer to the newly created object or a null pointer if the - * factory was unable to create an object of the given type - * @deprecated Use KService::createInstance() or KPluginLoader instead - */ - template - static KDE_DEPRECATED T *createInstance(const QString &keyword, const QString &libname, QObject *parent = 0, - const QVariantList &args = QVariantList(), - int *error = 0 ) - { - KLibrary *library = KLibLoader::self()->library( libname ); - if ( !library ) - { - if ( error ) - *error = ErrNoLibrary; - return 0; - } - KPluginFactory *factory = library->factory(); - if ( !factory ) - { - library->unload(); - if ( error ) - *error = ErrNoFactory; - return 0; - } - QObject *object = factory->template create(keyword, parent, args); - T *res = qobject_cast( object ); - if ( !res ) - { - delete object; - library->unload(); - if ( error ) - *error = ErrNoComponent; - } - return res; - } - - /** - * This template allows to load the specified library and ask the - * factory to create an instance of the given template type. - * - * @param libname the library to open - * @param parent the parent object (see QObject constructor) - * @param args a list of string arguments, passed to the factory and possibly - * to the component (see KPluginFactory) - * @param error if not null, the int will be set to 0 on success or one of the - * error codes defined by ComponentLoadingError if there was an error - * @return a pointer to the newly created object or a null pointer if the - * factory was unable to create an object of the given type - * @deprecated Use KService::createInstance() or KPluginLoader instead - */ - template - static KDE_DEPRECATED T *createInstance( const QString &libname, QObject *parent = 0, - const QVariantList &args = QVariantList(), - int *error = 0 ) - { - return createInstance(QString(), libname, parent, args, error); - } - - /** - * @deprecated Use one of the other createInstance methods or - * KPluginLoader or KService::createInstance instead - */ - template - static KDE_DEPRECATED T *createInstance( const QString &libname, QObject *parent, - const QStringList &args, - int *error = 0 ) - { - KLibrary *library = KLibLoader::self()->library( libname ); - if ( !library ) - { - if ( error ) - *error = ErrNoLibrary; - return 0; - } - KPluginFactory *factory = library->factory(); - if ( !factory ) - { - library->unload(); - if ( error ) - *error = ErrNoFactory; - return 0; - } - QObject *object = factory->template create(parent, args); - T *res = qobject_cast( object ); - if ( !res ) - { - delete object; - library->unload(); - if ( error ) - *error = ErrNoComponent; - } - return res; - } - -private: - ~KLibLoader(); - - KLibLoader(); -}; - -#endif #endif diff --git a/kdecore/util/kpluginfactory.cpp b/kdecore/util/kpluginfactory.cpp index 03402cd6..c3a22a1b 100644 --- a/kdecore/util/kpluginfactory.cpp +++ b/kdecore/util/kpluginfactory.cpp @@ -42,17 +42,6 @@ KPluginFactory::KPluginFactory(const char *componentName, const char *catalogNam factorycleanup->add(this); } -#ifndef KDE_NO_DEPRECATED -KPluginFactory::KPluginFactory(const KAboutData *aboutData, QObject *parent) - : QObject(parent), d_ptr(new KPluginFactoryPrivate) -{ - Q_D(KPluginFactory); - d->q_ptr = this; - d->componentData = KComponentData(*aboutData); - - factorycleanup->add(this); -} -#endif KPluginFactory::KPluginFactory(const KAboutData &aboutData, QObject *parent) : QObject(parent), d_ptr(new KPluginFactoryPrivate) @@ -64,15 +53,6 @@ KPluginFactory::KPluginFactory(const KAboutData &aboutData, QObject *parent) factorycleanup->add(this); } -#ifndef KDE_NO_DEPRECATED -KPluginFactory::KPluginFactory(QObject *parent) - : QObject(parent), d_ptr(new KPluginFactoryPrivate()) -{ - Q_D(KPluginFactory); - d->q_ptr = this; - factorycleanup->add(this); -} -#endif KPluginFactory::KPluginFactory(KPluginFactoryPrivate &d, QObject *parent) : QObject(parent), d_ptr(&d) @@ -137,26 +117,7 @@ void KPluginFactory::registerPlugin(const QString &keyword, const QMetaObject *m } } -#ifndef KDE_NO_DEPRECATED -QObject *KPluginFactory::createObject(QObject *parent, const char *className, const QStringList &args) -{ - Q_UNUSED(parent); - Q_UNUSED(className); - Q_UNUSED(args); - return 0; -} -#endif -#ifndef KDE_NO_DEPRECATED -KParts::Part *KPluginFactory::createPartObject(QWidget *parentWidget, QObject *parent, const char *classname, const QStringList &args) -{ - Q_UNUSED(parent); - Q_UNUSED(parentWidget); - Q_UNUSED(classname); - Q_UNUSED(args); - return 0; -} -#endif QObject *KPluginFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) { @@ -169,27 +130,6 @@ QObject *KPluginFactory::create(const char *iface, QWidget *parentWidget, QObjec setupTranslations(); } -#ifndef KDE_NO_DEPRECATED - if (keyword.isEmpty()) { - - // kde3-kparts compatibility, remove in kde5 - const char* kpartsIface = iface; - if (args.contains(QVariant(QString::fromLatin1("Browser/View")))) - kpartsIface = "Browser/View"; - - const QStringList argsStringList = variantListToStringList(args); - - if ((obj = reinterpret_cast(createPartObject(parentWidget, parent, kpartsIface, argsStringList)))) { - objectCreated(obj); - return obj; - } - - if ((obj = createObject(parent, iface, argsStringList))) { - objectCreated(obj); - return obj; - } - } -#endif const QList candidates(d->createInstanceHash.values(keyword)); // for !keyword.isEmpty() candidates.count() is 0 or 1 diff --git a/kdecore/util/kpluginfactory.h b/kdecore/util/kpluginfactory.h index 37364713..c388131a 100644 --- a/kdecore/util/kpluginfactory.h +++ b/kdecore/util/kpluginfactory.h @@ -256,19 +256,6 @@ public: * \param parent a parent object */ explicit KPluginFactory(const KAboutData &aboutData, QObject *parent = 0); - /** - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED explicit KPluginFactory(const KAboutData *aboutData, QObject *parent = 0); -#endif - - /** - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - explicit KDE_CONSTRUCTOR_DEPRECATED KPluginFactory(QObject *parent); -#endif /** * This destroys the PluginFactory. It will remove the translation catalog for the plugin, @@ -337,24 +324,10 @@ public: /** * @deprecated */ -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED - T *create(QObject *parent, const QStringList &args) - { - return create(parent, stringListToVariantList(args)); - } -#endif /** * @deprecated */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QObject *create(QObject *parent = 0, const char *classname = "QObject", const QStringList &args = QStringList()) - { - return create(classname, 0, parent, stringListToVariantList(args), QString()); - } -#endif Q_SIGNALS: void objectCreated(QObject *object); @@ -424,16 +397,10 @@ protected: /** * @deprecated */ -#ifndef KDE_NO_DEPRECATED - virtual KDE_DEPRECATED QObject *createObject(QObject *parent, const char *className, const QStringList &args); -#endif /** * @deprecated */ -#ifndef KDE_NO_DEPRECATED - virtual KDE_DEPRECATED KParts::Part *createPartObject(QWidget *parentWidget, QObject *parent, const char *classname, const QStringList &args); -#endif /** diff --git a/kdecore/util/kpluginloader.cpp b/kdecore/util/kpluginloader.cpp index 34ac7140..047a684d 100644 --- a/kdecore/util/kpluginloader.cpp +++ b/kdecore/util/kpluginloader.cpp @@ -186,14 +186,6 @@ KPluginFactory *KPluginLoader::factory() if (!load()) return 0; -#ifndef KDE_NO_DEPRECATED - if (d->lib) { - // Calling a deprecated method, but this is the only way to - // support both new and old-style factories for now. - // KDE5: remove the whole if(). - return d->lib->factory(d->name.toUtf8()); - } -#endif QObject *obj = instance(); diff --git a/kdecore/util/ksortablelist.h b/kdecore/util/ksortablelist.h index b0564fee..425792d6 100644 --- a/kdecore/util/ksortablelist.h +++ b/kdecore/util/ksortablelist.h @@ -116,13 +116,6 @@ public: */ const T& value() const { return this->second; } - /** - * @return the first value (the key) - * @deprecated use key() - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED Key index() const { return this->first; } -#endif /** * @return the first value. */ diff --git a/kdecore/util/kuser.h b/kdecore/util/kuser.h index 7847cb32..8f9d229c 100644 --- a/kdecore/util/kuser.h +++ b/kdecore/util/kuser.h @@ -167,9 +167,6 @@ public: * @return the full name of the user or QString() if user is invalid * @deprecated use property(KUser::FullName) instead */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString fullName() const; -#endif /** * The path to the user's home directory. diff --git a/kdecore/util/kuser_unix.cpp b/kdecore/util/kuser_unix.cpp index 6a612a6a..92ccafb9 100644 --- a/kdecore/util/kuser_unix.cpp +++ b/kdecore/util/kuser_unix.cpp @@ -145,11 +145,6 @@ QString KUser::loginName() const { return d->loginName; } -#ifndef KDE_NO_DEPRECATED -QString KUser::fullName() const { - return d->properties[FullName].toString(); -} -#endif QString KUser::homeDir() const { return d->homeDir; diff --git a/kded/kded.cpp b/kded/kded.cpp index b42d6a02..f3069318 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -40,11 +40,7 @@ #include #include #include -#ifndef KDE_NO_DEPRECATED -#include -#else #include -#endif #include #include #include @@ -391,15 +387,6 @@ KDEDModule *Kded::loadModule(const KService::Ptr& s, bool onDemand) if (factoryName.isEmpty()) factoryName = s->library(); factoryName = "create_" + factoryName; -#ifndef KDE_NO_DEPRECATED - KLibrary* lib = KLibLoader::self()->library(libname); - KDEDModule* (*create)(); - if (lib) { - create = (KDEDModule* (*)())lib->resolveFunction(QFile::encodeName(factoryName)); - if (create) - module = create(); - } -#endif if (!module) { kWarning() << "Could not load library" << libname << ". [" << loader.errorString() << "]"; diff --git a/kdeui/actions/kaction.cpp b/kdeui/actions/kaction.cpp index c0703328..51dcf8ad 100644 --- a/kdeui/actions/kaction.cpp +++ b/kdeui/actions/kaction.cpp @@ -283,28 +283,12 @@ void KAction::setGlobalShortcut( const KShortcut & shortcut, ShortcutTypes type, } } -#ifndef KDE_NO_DEPRECATED -bool KAction::globalShortcutAllowed() const -{ - return d->globalShortcutEnabled; -} -#endif bool KAction::isGlobalShortcutEnabled() const { return d->globalShortcutEnabled; } -#ifndef KDE_NO_DEPRECATED -void KAction::setGlobalShortcutAllowed( bool allowed, GlobalShortcutLoading /* load */ ) -{ - if (allowed) { - //### no-op - } else { - forgetGlobalShortcut(); - } -} -#endif void KAction::forgetGlobalShortcut() { diff --git a/kdeui/actions/kaction.h b/kdeui/actions/kaction.h index 4d400b24..fe3283e7 100644 --- a/kdeui/actions/kaction.h +++ b/kdeui/actions/kaction.h @@ -220,9 +220,6 @@ class KDEUI_EXPORT KAction : public QWidgetAction Q_PROPERTY( KShortcut shortcut READ shortcut WRITE setShortcut ) Q_PROPERTY( bool shortcutConfigurable READ isShortcutConfigurable WRITE setShortcutConfigurable ) Q_PROPERTY( KShortcut globalShortcut READ globalShortcut WRITE setGlobalShortcut ) -#ifndef KDE_NO_DEPRECATED - Q_PROPERTY( bool globalShortcutAllowed READ globalShortcutAllowed WRITE setGlobalShortcutAllowed ) -#endif Q_PROPERTY( bool globalShortcutEnabled READ isGlobalShortcutEnabled ) Q_FLAGS( ShortcutType ) @@ -427,21 +424,6 @@ public: * Defaults to false. * Use isGlobalShortcutEnabled() instead. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool globalShortcutAllowed() const; -#endif - - /** - * Indicate whether the programmer and/or user may define a global shortcut for this action. - * Defaults to false. Note that calling setGlobalShortcut() turns this on automatically. - * - * \param allowed set to \e true if this action may have a global shortcut, otherwise \e false. - * \param loading if Autoloading, assign to this action the global shortcut it has previously had - * if any. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setGlobalShortcutAllowed(bool allowed, GlobalShortcutLoading loading = Autoloading); -#endif /** * Returns true if this action is enabled to have a global shortcut. diff --git a/kdeui/actions/kactionmenu.cpp b/kdeui/actions/kactionmenu.cpp index a9c5ce55..57293ba0 100644 --- a/kdeui/actions/kactionmenu.cpp +++ b/kdeui/actions/kactionmenu.cpp @@ -104,13 +104,6 @@ QWidget * KActionMenu::createWidget( QWidget * _parent ) return button; } -#ifndef KDE_NO_DEPRECATED -void KActionMenu::remove( KAction* cmd ) -{ - if ( cmd ) - menu()->removeAction(cmd); -} -#endif void KActionMenu::addAction( QAction * action ) { diff --git a/kdeui/actions/kactionmenu.h b/kdeui/actions/kactionmenu.h index e1f1a978..7fa40327 100644 --- a/kdeui/actions/kactionmenu.h +++ b/kdeui/actions/kactionmenu.h @@ -56,28 +56,12 @@ public: KActionMenu(const KIcon& icon, const QString& text, QObject *parent); virtual ~KActionMenu(); - /** - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void remove( KAction* ); -#endif - void addAction(QAction* action); QAction* addSeparator(); void insertAction(QAction* before, QAction* action); QAction* insertSeparator(QAction* before); void removeAction(QAction* action); - /** - * Returns this action's menu as a KMenu, if it is one. - * If none exists, one will be created. - * @deprecated use menu() instead. - */ -#ifndef KDE_NO_DEPRECATED - inline KDE_DEPRECATED KMenu* popupMenu() { return menu(); } -#endif - /** * Returns this action's menu as a KMenu, if it is one. * If none exists, one will be created. diff --git a/kdeui/actions/kstandardaction.h b/kdeui/actions/kstandardaction.h index b0d7370a..99eb278e 100644 --- a/kdeui/actions/kstandardaction.h +++ b/kdeui/actions/kstandardaction.h @@ -188,11 +188,6 @@ namespace KStandardAction */ KDEUI_EXPORT const char* name( StandardAction id ); - /// @deprecated use name() -#ifndef KDE_NO_DEPRECATED - inline KDE_DEPRECATED const char* stdName(StandardAction act_enum) { return name( act_enum ); } -#endif - /** * Returns a list of all standard names. Used by KAccelManager * to give those heigher weight. diff --git a/kdeui/actions/ktoolbarpopupaction.cpp b/kdeui/actions/ktoolbarpopupaction.cpp index 0554f38d..a58f7261 100644 --- a/kdeui/actions/ktoolbarpopupaction.cpp +++ b/kdeui/actions/ktoolbarpopupaction.cpp @@ -60,12 +60,6 @@ KToolBarPopupAction::~KToolBarPopupAction() delete menu(); } -#ifndef KDE_NO_DEPRECATED -KMenu* KToolBarPopupAction::popupMenu() const -{ - return qobject_cast( menu() ); -} -#endif QWidget * KToolBarPopupAction::createWidget( QWidget * _parent ) { diff --git a/kdeui/actions/ktoolbarpopupaction.h b/kdeui/actions/ktoolbarpopupaction.h index 826679b0..8b4a1148 100644 --- a/kdeui/actions/ktoolbarpopupaction.h +++ b/kdeui/actions/ktoolbarpopupaction.h @@ -69,17 +69,6 @@ class KDEUI_EXPORT KToolBarPopupAction : public KAction */ virtual ~KToolBarPopupAction(); - /** - * The popup menu that is shown when clicking (some time) on the toolbar - * button. You may want to plug items into it on creation, or connect to - * aboutToShow for a more dynamic menu. - * - * \deprecated use menu() instead - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED KMenu *popupMenu() const; -#endif - /** * Returns true if this action creates a delayed popup menu * when plugged in a KToolBar. diff --git a/kdeui/dialogs/kshortcutseditor.cpp b/kdeui/dialogs/kshortcutseditor.cpp index 7ad530d0..34ba30d6 100644 --- a/kdeui/dialogs/kshortcutseditor.cpp +++ b/kdeui/dialogs/kshortcutseditor.cpp @@ -173,12 +173,6 @@ void KShortcutsEditor::clearConfiguration() } -#ifndef KDE_NO_DEPRECATED -void KShortcutsEditor::importConfiguration( KConfig *config) -{ - d->importConfiguration(config); -} -#endif void KShortcutsEditor::importConfiguration( KConfigBase *config) @@ -187,12 +181,6 @@ void KShortcutsEditor::importConfiguration( KConfigBase *config) } -#ifndef KDE_NO_DEPRECATED -void KShortcutsEditor::exportConfiguration( KConfig *config) const -{ - exportConfiguration(static_cast(config)); -} -#endif void KShortcutsEditor::exportConfiguration( KConfigBase *config) const diff --git a/kdeui/dialogs/kshortcutseditor.h b/kdeui/dialogs/kshortcutseditor.h index e434b4c0..806a6739 100644 --- a/kdeui/dialogs/kshortcutseditor.h +++ b/kdeui/dialogs/kshortcutseditor.h @@ -184,9 +184,6 @@ public: * * @param config Config object */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void exportConfiguration( KConfig *config) const; -#endif void exportConfiguration( KConfigBase *config) const; /** @@ -197,9 +194,6 @@ public: * * @param config Config object */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void importConfiguration( KConfig *config); -#endif void importConfiguration( KConfigBase *config); diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp index 224e6349..16ad91c5 100644 --- a/kdeui/icons/kiconloader.cpp +++ b/kdeui/icons/kiconloader.cpp @@ -1497,23 +1497,6 @@ bool KIconLoader::alphaBlending(KIconLoader::Group group) const return d->mpGroups[group].alphaBlending; } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon KIconLoader::loadIconSet( const QString& name, KIconLoader::Group g, int s, - bool canReturnNull ) -{ - QIcon iconset; - QPixmap tmp = loadIcon(name, g, s, KIconLoader::ActiveState, QStringList(), NULL, canReturnNull); - iconset.addPixmap( tmp, QIcon::Active, QIcon::On ); - // we don't use QIconSet's resizing anyway - tmp = loadIcon(name, g, s, KIconLoader::DisabledState, QStringList(), NULL, canReturnNull); - iconset.addPixmap( tmp, QIcon::Disabled, QIcon::On ); - tmp = loadIcon(name, g, s, KIconLoader::DefaultState, QStringList(), NULL, canReturnNull); - iconset.addPixmap( tmp, QIcon::Normal, QIcon::On ); - return iconset; -} -#endif - // Easy access functions QPixmap DesktopIcon(const QString& name, int force_size, int state, const QStringList &overlays) @@ -1522,75 +1505,30 @@ QPixmap DesktopIcon(const QString& name, int force_size, int state, const QStrin return loader->loadIcon(name, KIconLoader::Desktop, force_size, state, overlays); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon DesktopIconSet(const QString& name, int force_size) -{ - KIconLoader *loader = KIconLoader::global(); - return loader->loadIconSet(name, KIconLoader::Desktop, force_size); -} -#endif - QPixmap BarIcon(const QString& name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::Toolbar, force_size, state, overlays); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon BarIconSet(const QString& name, int force_size) -{ - KIconLoader *loader = KIconLoader::global(); - return loader->loadIconSet( name, KIconLoader::Toolbar, force_size ); -} -#endif - QPixmap SmallIcon(const QString& name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::Small, force_size, state, overlays); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon SmallIconSet(const QString& name, int force_size) -{ - KIconLoader *loader = KIconLoader::global(); - return loader->loadIconSet( name, KIconLoader::Small, force_size ); -} -#endif - QPixmap MainBarIcon(const QString& name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::MainToolbar, force_size, state, overlays); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon MainBarIconSet(const QString& name, int force_size) -{ - KIconLoader *loader = KIconLoader::global(); - return loader->loadIconSet( name, KIconLoader::MainToolbar, force_size ); -} -#endif - QPixmap UserIcon(const QString& name, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::User, 0, state, overlays); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon UserIconSet(const QString& name) -{ - KIconLoader *loader = KIconLoader::global(); - return loader->loadIconSet( name, KIconLoader::User ); -} -#endif - int IconSize(KIconLoader::Group group) { KIconLoader *loader = KIconLoader::global(); diff --git a/kdeui/icons/kiconloader.h b/kdeui/icons/kiconloader.h index 6a9d1af2..17f59865 100644 --- a/kdeui/icons/kiconloader.h +++ b/kdeui/icons/kiconloader.h @@ -93,7 +93,6 @@ public: Action, ///< An action icon (e.g. 'save', 'print'). Application, ///< An icon that represents an application. Device, ///< An icon that represents a device. - FileSystem, ///< An icon that represents a file system. @deprecated Use Place instead. MimeType, ///< An icon that represents a mime type (or file type). Animation, ///< An icon that is animated. Category, ///< An icon that represents a category. @@ -274,28 +273,6 @@ public: int state=KIconLoader::DefaultState, const QStringList &overlays = QStringList(), QString *path_store=0 ) const; - /** - * Creates an icon set, that will do on-demand loading of the icon. - * Loading itself is done by calling loadIcon . - * - * @param name The name of the icon, without extension. - * @param group The icon group. This will specify the size of and effects to - * be applied to the icon. - * @param size If nonzero, this overrides the size specified by @p group. - * See KIconLoader::StdSizes. - * @param canReturnNull Can return a null iconset? If false, iconset - * containing the "unknown" pixmap is returned when no appropriate icon has - * been found. - * @return the icon set. Can be null when not found, depending on - * @p canReturnNull. - * - * @deprecated use KIcon instead, which uses the iconloader internally - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QIcon loadIconSet(const QString& name, KIconLoader::Group group, int size = 0, - bool canReturnNull = false); -#endif - /** * Returns the path of an icon. * @param name The name of the icon, without extension. If an absolute @@ -482,15 +459,6 @@ Q_SIGNALS: KDEUI_EXPORT QPixmap DesktopIcon(const QString& name, int size=0, int state=KIconLoader::DefaultState, const QStringList& overlays = QStringList()); -/** - * \relates KIconLoader - * Load a desktop icon, and apply the necessary effects to get an IconSet. - * @deprecated use KIcon(name) or KIcon(name,componentData.iconLoader()) instead - */ -#ifndef KDE_NO_DEPRECATED -KDEUI_EXPORT_DEPRECATED QIcon DesktopIconSet(const QString& name, int size=0); -#endif - /** * \relates KIconLoader * Load a toolbar icon. @@ -498,15 +466,6 @@ KDEUI_EXPORT_DEPRECATED QIcon DesktopIconSet(const QString& name, int size=0); KDEUI_EXPORT QPixmap BarIcon(const QString& name, int size=0, int state=KIconLoader::DefaultState, const QStringList& overlays = QStringList()); -/** - * \relates KIconLoader - * Load a toolbar icon, and apply the necessary effects to get an IconSet. - * @deprecated use KIcon(name) or KIcon(name,componentData.iconLoader()) instead - */ -#ifndef KDE_NO_DEPRECATED -KDEUI_EXPORT_DEPRECATED QIcon BarIconSet(const QString& name, int size=0); -#endif - /** * \relates KIconLoader * Load a small icon. @@ -514,15 +473,6 @@ KDEUI_EXPORT_DEPRECATED QIcon BarIconSet(const QString& name, int size=0); KDEUI_EXPORT QPixmap SmallIcon(const QString& name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays = QStringList()); -/** - * \relates KIconLoader - * Load a small icon, and apply the necessary effects to get an IconSet. - * @deprecated use KIcon(name) or KIcon(name,componentData.iconLoader()) instead - */ -#ifndef KDE_NO_DEPRECATED -KDEUI_EXPORT_DEPRECATED QIcon SmallIconSet(const QString& name, int size=0); -#endif - /** * \relates KIconLoader * Load a main toolbar icon. @@ -530,30 +480,12 @@ KDEUI_EXPORT_DEPRECATED QIcon SmallIconSet(const QString& name, int size=0); KDEUI_EXPORT QPixmap MainBarIcon(const QString& name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays = QStringList()); -/** - * \relates KIconLoader - * Load a main toolbar icon, and apply the effects to get an IconSet. - * @deprecated use KIcon(name) or KIcon(name,componentData.iconLoader()) instead - */ -#ifndef KDE_NO_DEPRECATED -KDEUI_EXPORT_DEPRECATED QIcon MainBarIconSet(const QString& name, int size=0); -#endif - /** * \relates KIconLoader * Load a user icon. User icons are searched in $appdir/pics. */ KDEUI_EXPORT QPixmap UserIcon(const QString& name, int state=KIconLoader::DefaultState, const QStringList &overlays = QStringList()); -/** - * \relates KIconLoader - * Load a user icon, and apply the effects to get an IconSet. - * @deprecated use KIcon(name) or KIcon(name,componentData.iconLoader()) instead - */ -#ifndef KDE_NO_DEPRECATED -KDEUI_EXPORT_DEPRECATED QIcon UserIconSet(const QString& name); -#endif - /** * \relates KIconLoader * Returns the current icon size for a specific group. diff --git a/kdeui/icons/kicontheme.cpp b/kdeui/icons/kicontheme.cpp index c507d18a..b2b1c037 100644 --- a/kdeui/icons/kicontheme.cpp +++ b/kdeui/icons/kicontheme.cpp @@ -650,8 +650,6 @@ KIconThemeDir::KIconThemeDir(const QString& basedir, const QString &themedir, co mContext = KIconLoader::Device; else if (tmp == "MimeTypes") mContext = KIconLoader::MimeType; - else if (tmp == "FileSystems") - mContext = KIconLoader::FileSystem; else if (tmp == "Applications") mContext = KIconLoader::Application; else if (tmp == "Actions") diff --git a/kdeui/itemviews/kcategorizedsortfilterproxymodel.cpp b/kdeui/itemviews/kcategorizedsortfilterproxymodel.cpp index c433c3dd..922c040e 100644 --- a/kdeui/itemviews/kcategorizedsortfilterproxymodel.cpp +++ b/kdeui/itemviews/kcategorizedsortfilterproxymodel.cpp @@ -94,13 +94,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 { diff --git a/kdeui/itemviews/kcategorizedsortfilterproxymodel.h b/kdeui/itemviews/kcategorizedsortfilterproxymodel.h index a3146dcf..d5dfbc67 100644 --- a/kdeui/itemviews/kcategorizedsortfilterproxymodel.h +++ b/kdeui/itemviews/kcategorizedsortfilterproxymodel.h @@ -111,9 +111,6 @@ public: * @deprecated * Use KStringHandler::naturalCompare() instead. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static int naturalCompare(const QString &a, const QString &b); -#endif protected: /** diff --git a/kdeui/itemviews/kcategorizedview.cpp b/kdeui/itemviews/kcategorizedview.cpp index 16f0a4fc..66cf1ffa 100644 --- a/kdeui/itemviews/kcategorizedview.cpp +++ b/kdeui/itemviews/kcategorizedview.cpp @@ -1497,27 +1497,7 @@ 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() { diff --git a/kdeui/itemviews/kcategorizedview.h b/kdeui/itemviews/kcategorizedview.h index b03744e9..217d25bf 100644 --- a/kdeui/itemviews/kcategorizedview.h +++ b/kdeui/itemviews/kcategorizedview.h @@ -308,26 +308,6 @@ protected: int end); 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. diff --git a/kdeui/itemviews/kwidgetitemdelegate.cpp b/kdeui/itemviews/kwidgetitemdelegate.cpp index cdd04618..76afb755 100644 --- a/kdeui/itemviews/kwidgetitemdelegate.cpp +++ b/kdeui/itemviews/kwidgetitemdelegate.cpp @@ -222,15 +222,6 @@ QPersistentModelIndex KWidgetItemDelegate::focusedIndex() const return d->itemView->indexAt(pos); } -#ifndef KDE_NO_DEPRECATED -void KWidgetItemDelegate::paintWidgets(QPainter *painter, const QStyleOptionViewItem &option, - const QPersistentModelIndex &index) const -{ - Q_UNUSED(painter); - Q_UNUSED(option); - Q_UNUSED(index); -} -#endif //@cond PRIVATE bool KWidgetItemDelegatePrivate::eventFilter(QObject *watched, QEvent *event) diff --git a/kdeui/itemviews/kwidgetitemdelegate.h b/kdeui/itemviews/kwidgetitemdelegate.h index 232864a6..19416112 100644 --- a/kdeui/itemviews/kwidgetitemdelegate.h +++ b/kdeui/itemviews/kwidgetitemdelegate.h @@ -128,10 +128,6 @@ protected: * widgets of a certain index to be updated your model has to emit dataChanged() on the * indexes that want to be updated. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void paintWidgets(QPainter *painter, const QStyleOptionViewItem &option, - const QPersistentModelIndex &index) const; -#endif /** * Sets the list of event @p types that a @p widget will block. diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp index 5096920c..1af9858c 100644 --- a/kdeui/kernel/kapplication.cpp +++ b/kdeui/kernel/kapplication.cpp @@ -944,37 +944,6 @@ void KApplication::updateRemoteUserTimestamp( const QString& service, int time ) } -#ifndef KDE_NO_DEPRECATED -QString KApplication::tempSaveName( const QString& pFilename ) -{ - QString aFilename; - - if( QDir::isRelativePath(pFilename) ) - { - kWarning(240) << "Relative filename passed to KApplication::tempSaveName"; - aFilename = QFileInfo( QDir( QLatin1String(".") ), pFilename ).absoluteFilePath(); - } - else - aFilename = pFilename; - - QDir aAutosaveDir( QDir::homePath() + QLatin1String("/autosave/") ); - if( !aAutosaveDir.exists() ) - { - if( !aAutosaveDir.mkdir( aAutosaveDir.absolutePath() ) ) - { - // Last chance: use temp dir - aAutosaveDir.setPath( KGlobal::dirs()->saveLocation("tmp") ); - } - } - - aFilename.replace( '/', QLatin1String("\\!") ) - .prepend( QLatin1Char('#') ) - .append( QLatin1Char('#') ) - .prepend( QLatin1Char('/') ).prepend( aAutosaveDir.absolutePath() ); - - return aFilename; -} -#endif QString KApplication::checkRecoverFile( const QString& pFilename, diff --git a/kdeui/kernel/kapplication.h b/kdeui/kernel/kapplication.h index 0dcb3394..1655362d 100644 --- a/kdeui/kernel/kapplication.h +++ b/kdeui/kernel/kapplication.h @@ -207,18 +207,6 @@ public: **/ void setTopWidget( QWidget *topWidget ); - /** - * Get a file name in order to make a temporary copy of your document. - * - * @param pFilename The full path to the current file of your - * document. - * @return A new filename for auto-saving. - * @deprecated use KTemporaryFile, KSaveFile or KAutoSaveFile instead - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED QString tempSaveName( const QString& pFilename ); -#endif - /** * Check whether an auto-save file exists for the document you want to * open. diff --git a/kdeui/kernel/kglobalsettings.cpp b/kdeui/kernel/kglobalsettings.cpp index dd9902b1..dbd1d355 100644 --- a/kdeui/kernel/kglobalsettings.cpp +++ b/kdeui/kernel/kglobalsettings.cpp @@ -274,35 +274,6 @@ bool KGlobalSettings::showContextMenusOnPress () return g.readEntry("ShowOnPress", true); } -#ifndef KDE_NO_DEPRECATED -int KGlobalSettings::contextMenuKey () -{ - KConfigGroup g(KGlobal::config(), "Shortcuts"); - QString s = g.readEntry ("PopupMenuContext", "Menu"); - - // this is a bit of a code duplication with KShortcut, - // but seeing as that is all in kdeui these days there's little choice. - // this is faster for what we're really after here anyways - // (less allocations, only processing the first item always, etc) - if (s == QLatin1String("none")) { - return QKeySequence()[0]; - } - - const QStringList shortCuts = s.split(';'); - - if (shortCuts.count() < 1) { - return QKeySequence()[0]; - } - - s = shortCuts.at(0); - - if ( s.startsWith( QLatin1String("default(") ) ) { - s = s.mid( 8, s.length() - 9 ); - } - - return QKeySequence::fromString(s)[0]; -} -#endif // NOTE: keep this in sync with kdebase/workspace/kcontrol/colors/colorscm.cpp QColor KGlobalSettings::inactiveTitleColor() diff --git a/kdeui/kernel/kglobalsettings.h b/kdeui/kernel/kglobalsettings.h index 1d41ac22..214ea50f 100644 --- a/kdeui/kernel/kglobalsettings.h +++ b/kdeui/kernel/kglobalsettings.h @@ -169,17 +169,6 @@ public: */ static int autoSelectDelay(); - /** - * Returns the KDE setting for the shortcut key to open - * context menus. - * - * @return the key that pops up context menus. - * @deprecated Simply reimplement QWidget::contextMenuEvent() instead. - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED int contextMenuKey (); -#endif - /** * Returns the KDE setting for context menus. * diff --git a/kdeui/kernel/kuniqueapplication.cpp b/kdeui/kernel/kuniqueapplication.cpp index cff7f8f9..4a486918 100644 --- a/kdeui/kernel/kuniqueapplication.cpp +++ b/kdeui/kernel/kuniqueapplication.cpp @@ -385,12 +385,6 @@ int KUniqueApplication::newInstance() return 0; // do nothing in default implementation } -#ifndef KDE_NO_DEPRECATED -void KUniqueApplication::setHandleAutoStarted() -{ - Private::s_handleAutoStarted = false; -} -#endif //// diff --git a/kdeui/kernel/kuniqueapplication.h b/kdeui/kernel/kuniqueapplication.h index e05dcd73..f1aa6d9b 100644 --- a/kdeui/kernel/kuniqueapplication.h +++ b/kdeui/kernel/kuniqueapplication.h @@ -212,13 +212,6 @@ public: */ bool restoringSession(); - /** - * @internal - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static void setHandleAutoStarted(); -#endif - private: friend class KUniqueApplicationAdaptor; class Private; diff --git a/kdeui/shortcuts/kglobalaccel.cpp b/kdeui/shortcuts/kglobalaccel.cpp index 1ec35e1c..06eeab8d 100644 --- a/kdeui/shortcuts/kglobalaccel.cpp +++ b/kdeui/shortcuts/kglobalaccel.cpp @@ -102,9 +102,6 @@ org::kde::kglobalaccel::Component *KGlobalAccelPrivate::getComponent(const QStri KGlobalAccelPrivate::KGlobalAccelPrivate(KGlobalAccel *q) : isUsingForeignComponentName(false), -#ifndef KDE_NO_DEPRECATED - enabled(true), -#endif iface("org.kde.kglobalaccel", "/kglobalaccel", QDBusConnection::sessionBus()), q(q) { @@ -197,12 +194,6 @@ bool KGlobalAccel::isComponentActive(const QString &componentUnique) } -#ifndef KDE_NO_DEPRECATED -bool KGlobalAccel::isEnabled() const -{ - return d->enabled; -} -#endif org::kde::kglobalaccel::Component *KGlobalAccel::getComponent(const QString &componentUnique) @@ -211,21 +202,8 @@ org::kde::kglobalaccel::Component *KGlobalAccel::getComponent(const QString &com } -#ifndef KDE_NO_DEPRECATED -void KGlobalAccel::setEnabled(bool enabled) -{ - d->enabled = enabled; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KGlobalAccel::overrideMainComponentData(const KComponentData &kcd) -{ - d->readComponentData(kcd); - d->isUsingForeignComponentName = true; -} -#endif KGlobalAccel *KGlobalAccel::self() @@ -491,32 +469,6 @@ void KGlobalAccelPrivate::reRegisterAll() } } - -#ifndef KDE_NO_DEPRECATED -QList KGlobalAccel::allMainComponents() -{ - return d->iface.allMainComponents(); -} -#endif - - -#ifndef KDE_NO_DEPRECATED -QList KGlobalAccel::allActionsForComponent(const QStringList &actionId) -{ - return d->iface.allActionsForComponent(actionId); -} -#endif - - -//static -#ifndef KDE_NO_DEPRECATED -QStringList KGlobalAccel::findActionNameSystemwide(const QKeySequence &seq) -{ - return self()->d->iface.action(seq[0]); -} -#endif - - QList KGlobalAccel::getGlobalShortcutsByKey(const QKeySequence &seq) { return self()->d->iface.getGlobalShortcutsByKey(seq[0]); @@ -528,28 +480,6 @@ bool KGlobalAccel::isGlobalShortcutAvailable(const QKeySequence &seq, const QStr return self()->d->iface.isGlobalShortcutAvailable(seq[0], comp); } - -//static -#ifndef KDE_NO_DEPRECATED -bool KGlobalAccel::promptStealShortcutSystemwide(QWidget *parent, const QStringList &actionIdentifier, - const QKeySequence &seq) -{ - if (actionIdentifier.size() < 4) { - return false; - } - QString title = i18n("Conflict with Global Shortcut"); - QString message = i18n("The '%1' key combination has already been allocated " - "to the global action \"%2\" in %3.\n" - "Do you want to reassign it from that action to the current one?", - seq.toString(), actionIdentifier.at(KGlobalAccel::ActionFriendly), - actionIdentifier.at(KGlobalAccel::ComponentFriendly)); - - return KMessageBox::warningContinueCancel(parent, message, title, KGuiItem(i18n("Reassign"))) - == KMessageBox::Continue; -} -#endif - - //static bool KGlobalAccel::promptStealShortcutSystemwide( QWidget *parent, diff --git a/kdeui/shortcuts/kglobalaccel.h b/kdeui/shortcuts/kglobalaccel.h index 7e5166cc..30c1304d 100644 --- a/kdeui/shortcuts/kglobalaccel.h +++ b/kdeui/shortcuts/kglobalaccel.h @@ -161,81 +161,6 @@ public: const QList &shortcuts, const QKeySequence &seq); - /** - * No effect. - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isEnabled() const; -#endif - - /** - * No effect. - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setEnabled(bool enabled); -#endif - - /** - * Set the KComponentData for which to manipulate shortcuts. This is for exceptional - * situations, when you want to modify the shortcuts of another application - * as if they were yours. - * You cannot have your own working global shortcuts in a module/application using this - * special functionality. All global shortcuts of KActions will essentially be proxies. - * Be sure to set the default global shortcuts of the proxy KActions to the same as - * those on the receiving end. - * An example use case is the KControl Module for the window manager KWin, which has - * no own facility for users to change its global shortcuts. - * - * @param componentData a KComponentData about the application for which you want to - * manipulate shortcuts. - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void overrideMainComponentData(const KComponentData &componentData); -#endif - - /** - * Return the unique and common names of all main components that have global shortcuts. - * The action strings of the returned actionId stringlists will be empty. - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QList allMainComponents(); -#endif - - /** - * @see getGlobalShortcutsByComponent - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QList allActionsForComponent(const QStringList &actionId); -#endif - - /** - * @see getGlobalShortcutsByKey - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static QStringList findActionNameSystemwide(const QKeySequence &seq); -#endif - - /** - * @see promptStealShortcutSystemwide below - * - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static bool promptStealShortcutSystemwide(QWidget *parent, const QStringList &actionIdentifier, const QKeySequence &seq); -#endif - private: friend class KAction; diff --git a/kdeui/tests/kglobalshortcuttest.cpp b/kdeui/tests/kglobalshortcuttest.cpp index e3c2237f..b598b4ec 100644 --- a/kdeui/tests/kglobalshortcuttest.cpp +++ b/kdeui/tests/kglobalshortcuttest.cpp @@ -68,12 +68,6 @@ void KGlobalShortcutTest::setupTest(QString id) // Ensure that the previous test did cleanup correctly KGlobalAccel *kga = KGlobalAccel::self(); -#ifndef KDE_NO_DEPRECATED - QList components = kga->allMainComponents(); - QStringList componentId; - componentId << "qttest" << QString() << "KDE Test Program" << QString(); - // QVERIFY(!components.contains(componentId)); -#endif m_actionA = new KAction("Text For Action A", this); m_actionA->setObjectName("Action A:" + id); @@ -241,23 +235,7 @@ void KGlobalShortcutTest::testListActions() // As in kdebase/workspace/kcontrol/keys/globalshortcuts.cpp KGlobalAccel *kga = KGlobalAccel::self(); -#ifndef KDE_NO_DEPRECATED - QList components = kga->allMainComponents(); - //qDebug() << components; - QStringList componentId; - componentId << "qttest" << QString() << "KDE Test Program" << QString(); - QVERIFY(components.contains(componentId)); -#endif -#ifndef KDE_NO_DEPRECATED - QList actions = kga->allActionsForComponent(componentId); - QVERIFY(!actions.isEmpty()); - QStringList actionIdA; actionIdA << "qttest" << "Action A:testListActions" << "KDE Test Program" << "Text For Action A"; - QStringList actionIdB; actionIdB << "qttest" << "Action B:testListActions" << "KDE Test Program" << "Text For Action B"; - //qDebug() << actions; - QVERIFY(actions.contains(actionIdA)); - QVERIFY(actions.contains(actionIdB)); -#endif } void KGlobalShortcutTest::testComponentAssignment() @@ -347,36 +325,6 @@ void KGlobalShortcutTest::testOverrideMainComponentData() action->forgetGlobalShortcut(); delete coll.takeAction(action); -#ifndef KDE_NO_DEPRECATED - // activate overrideMainComponentData, it's not revokable currently! - // overrideMainComponentData only overrides the component if the action - // gets a real global shortcut! - KComponentData globalComponent("test_component2"); - KGlobalAccel::self()->overrideMainComponentData(globalComponent); - - // Action with action collection gets the global component - action = new KAction("Text For Action A", this); - QVERIFY(action->d->componentData == KGlobal::mainComponent()); - action->setObjectName("Action A"); - action->setGlobalShortcut(cutB, KAction::ActiveShortcut, KAction::NoAutoloading); - QVERIFY(action->d->componentData == globalComponent); - - // Action with action collection get the component of the collection until - // a global shortcut is set when overrideMainComponentData is active - action->forgetGlobalShortcut(); - delete action; - QVERIFY(coll.isEmpty()); - - action = coll.addAction("Action A"); - QVERIFY(action->d->componentData == otherComponent); - action->setGlobalShortcut(cutB, KAction::ActiveShortcut, KAction::NoAutoloading); - QVERIFY(action->d->componentData == globalComponent); - - // forget the global shortcut - action->forgetGlobalShortcut(); - // Actions that were created by the KActionCollection::addAction have the - // collections as parent. Ensure action is not deleted. -#endif } void KGlobalShortcutTest::testNotification() @@ -418,12 +366,6 @@ void KGlobalShortcutTest::testForgetGlobalShortcut() sleep(1); KGlobalAccel *kga = KGlobalAccel::self(); -#ifndef KDE_NO_DEPRECATED - QList components = kga->allMainComponents(); - QStringList componentId; - componentId << "qttest" << QString() << "KDE Test Program" << QString(); - QVERIFY(!components.contains(componentId)); -#endif } diff --git a/kdeui/tests/klineedit_unittest.cpp b/kdeui/tests/klineedit_unittest.cpp index 8e8e78e8..a1c7598c 100644 --- a/kdeui/tests/klineedit_unittest.cpp +++ b/kdeui/tests/klineedit_unittest.cpp @@ -60,31 +60,17 @@ private Q_SLOTS: // setText emits textChanged and userTextChanged, but not textEdited QSignalSpy textChangedSpy(&w, SIGNAL(textChanged(QString))); QSignalSpy textEditedSpy(&w, SIGNAL(textEdited(QString))); -#ifndef KDE_NO_DEPRECATED - QSignalSpy userTextChangedSpy(&w, SIGNAL(userTextChanged(QString))); -#endif w.setText("Hello worl"); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 1); - QCOMPARE(userTextChangedSpy[0][0].toString(), w.text()); -#endif QCOMPARE(textChangedSpy.count(), 1); QCOMPARE(textChangedSpy[0][0].toString(), w.text()); QCOMPARE(textEditedSpy.count(), 0); QVERIFY(!w.isModified()); -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); // typing emits all three signals QTest::keyClick(&w, Qt::Key_D); QCOMPARE(w.text(), QString::fromLatin1("Hello world")); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 1); - QCOMPARE(userTextChangedSpy[0][0].toString(), w.text()); -#endif QCOMPARE(textChangedSpy.count(), 1); QCOMPARE(textChangedSpy[0][0].toString(), w.text()); QCOMPARE(textEditedSpy.count(), 1); @@ -92,9 +78,6 @@ private Q_SLOTS: QVERIFY(w.isModified()); w.setText("K"); // prepare for next test -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); QVERIFY(!w.isModified()); @@ -111,16 +94,10 @@ private Q_SLOTS: w.doCompletion(w.text()); QCOMPARE(w.text(), items.at(0)); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 0); -#endif QCOMPARE(textChangedSpy.count(), 1); QCOMPARE(textChangedSpy[0][0].toString(), w.text()); QCOMPARE(textEditedSpy.count(), 0); QVERIFY(!w.isModified()); -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); @@ -128,18 +105,11 @@ private Q_SLOTS: QTest::keyClick(&w, Qt::Key_Right); QCOMPARE(w.text(), items.at(0)); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 1); - QCOMPARE(userTextChangedSpy[0][0].toString(), w.text()); -#endif QCOMPARE(textChangedSpy.count(), 1); QCOMPARE(textChangedSpy[0][0].toString(), w.text()); QCOMPARE(textEditedSpy.count(), 1); QCOMPARE(textEditedSpy[0][0].toString(), w.text()); QVERIFY(w.isModified()); -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); @@ -147,18 +117,11 @@ private Q_SLOTS: w.setCompletionMode(KGlobalSettings::CompletionPopup); w.setText("KDE"); QVERIFY(!w.isModified()); -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); w.doCompletion(w.text()); // popup appears QCOMPARE(w.text(), QString::fromLatin1("KDE")); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(textChangedSpy.count() + userTextChangedSpy.count() + textEditedSpy.count(), 0); -#else QCOMPARE(textChangedSpy.count() + textEditedSpy.count(), 0); -#endif w.completionBox()->down(); // select 1st item QCOMPARE(w.text(), items.at(0)); QVERIFY(w.isModified()); @@ -167,14 +130,8 @@ private Q_SLOTS: // Selecting an item in the popup completion changes the lineedit text // and emits textChanged and userTextChanged, but not textEdited. -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 2); -#endif QCOMPARE(textChangedSpy.count(), 2); QCOMPARE(textEditedSpy.count(), 0); -#ifndef KDE_NO_DEPRECATED - userTextChangedSpy.clear(); -#endif textChangedSpy.clear(); textEditedSpy.clear(); @@ -185,9 +142,6 @@ private Q_SLOTS: // Nothing else happens, the text was already set in the lineedit QCOMPARE(textChangedSpy.count(), 0); QCOMPARE(textEditedSpy.count(), 0); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(userTextChangedSpy.count(), 0); -#endif // Now when using the mouse in the popup completion w.setText("KDE"); diff --git a/kdeui/tests/kxerrorhandlertest.cpp b/kdeui/tests/kxerrorhandlertest.cpp index ba6750c5..4dcbc01b 100644 --- a/kdeui/tests/kxerrorhandlertest.cpp +++ b/kdeui/tests/kxerrorhandlertest.cpp @@ -58,13 +58,6 @@ int main() { KXErrorHandler handle2( dpy ); XGetWindowAttributes(dpy, w, &attr); -#ifndef KDE_NO_DEPRECATED - { - KXErrorHandler handle3( handler3, dpy ); - XSetInputFocus( dpy, w, RevertToParent, CurrentTime ); - cout << "WAS3:" << handle3.error( /*false*/ true ) << endl; - } -#endif cout << "WAS2:" << handle2.error( false ) << endl; } // XSync( dpy, False ); diff --git a/kdeui/util/kguiitem.cpp b/kdeui/util/kguiitem.cpp index 1dcc3ab9..84f7129d 100644 --- a/kdeui/util/kguiitem.cpp +++ b/kdeui/util/kguiitem.cpp @@ -160,22 +160,6 @@ KIcon KGuiItem::icon( ) const return KIcon(); } -// deprecated -#ifndef KDE_NO_DEPRECATED -QIcon KGuiItem::iconSet( KIconLoader::Group group, int size ) const -{ - if (d->m_hasIcon && KGlobal::mainComponent().isValid()) { - if( !d->m_iconName.isEmpty()) { - KIconLoader* iconLoader = KIconLoader::global(); - return iconLoader->loadIconSet( d->m_iconName, group, size ); - } else { - return d->m_icon; - } - } else - return QIcon(); -} -#endif - QString KGuiItem::iconName() const { return d->m_iconName; diff --git a/kdeui/util/kguiitem.h b/kdeui/util/kguiitem.h index 5676acf7..7691eeec 100644 --- a/kdeui/util/kguiitem.h +++ b/kdeui/util/kguiitem.h @@ -59,11 +59,6 @@ public: QString text() const; QString plainText() const; - /// @deprecated use icon() instead -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QIcon iconSet( KIconLoader::Group=KIconLoader::Small, int size = 0) const; -#endif - KIcon icon( ) const; QString iconName() const; @@ -71,9 +66,6 @@ public: QString whatsThis() const; bool isEnabled() const; bool hasIcon() const; -#if !defined(KDE_NO_COMPAT) && !defined(KDE_NO_DEPRECATED) - KDE_DEPRECATED bool hasIconSet() const { return hasIcon(); } -#endif void setText( const QString &text ); void setIcon( const KIcon &iconset ); diff --git a/kdeui/util/kxerrorhandler.cpp b/kdeui/util/kxerrorhandler.cpp index ff11b45c..484617c1 100644 --- a/kdeui/util/kxerrorhandler.cpp +++ b/kdeui/util/kxerrorhandler.cpp @@ -58,16 +58,6 @@ KXErrorHandler::KXErrorHandler( Display* dpy ) addHandler(); } -#ifndef KDE_NO_DEPRECATED -KXErrorHandler::KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy ) - : user_handler1( handler ), - user_handler2( NULL ), - old_handler( XSetErrorHandler( handler_wrapper )), - d( new KXErrorHandlerPrivate(dpy) ) - { - addHandler(); - } -#endif KXErrorHandler::KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy ) : user_handler1( NULL ), diff --git a/kdeui/util/kxerrorhandler.h b/kdeui/util/kxerrorhandler.h index 3e052e88..cf9eb6d8 100644 --- a/kdeui/util/kxerrorhandler.h +++ b/kdeui/util/kxerrorhandler.h @@ -74,15 +74,6 @@ class KDEUI_EXPORT KXErrorHandler * value. */ explicit KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = QX11Info::display()); - /** - * This constructor takes pointer to a function that will get request number, - * error code number and resource id of the failed request, as provided - * by XErrorEvent. If the function returns true, the error flag will be set. - * @deprecated Use the variant with XErrorEvent. - */ -#ifndef KDE_NO_DEPRECATED - explicit KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = QX11Info::display()) KDE_DEPRECATED; -#endif /** * This function returns true if the error flag is set (i.e. no custom handler * function was used and there was any error, or the custom handler indicated diff --git a/kdeui/widgets/kcharselect.cpp b/kdeui/widgets/kcharselect.cpp index 8250623f..d396e049 100644 --- a/kdeui/widgets/kcharselect.cpp +++ b/kdeui/widgets/kcharselect.cpp @@ -300,13 +300,6 @@ void KCharSelectTable::keyPressEvent(QKeyEvent *e) /* Class: KCharSelect */ /******************************************************************/ -#ifndef KDE_NO_DEPRECATED -KCharSelect::KCharSelect(QWidget *parent, const Controls controls) - : QWidget(parent), d(new KCharSelectPrivate(this)) -{ - init(controls, NULL); -} -#endif KCharSelect::KCharSelect( QWidget *parent diff --git a/kdeui/widgets/kcharselect.h b/kdeui/widgets/kcharselect.h index de9e1841..f229b263 100644 --- a/kdeui/widgets/kcharselect.h +++ b/kdeui/widgets/kcharselect.h @@ -107,11 +107,6 @@ public: Control) /** @deprecated */ -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED explicit KCharSelect( - QWidget *parent, - const Controls controls = AllGuiElements); -#endif /** * Constructor. @p controls can be used to show a custom set of widgets. diff --git a/kdeui/widgets/kcombobox.cpp b/kdeui/widgets/kcombobox.cpp index c3d6e542..a4aaeb33 100644 --- a/kdeui/widgets/kcombobox.cpp +++ b/kdeui/widgets/kcombobox.cpp @@ -126,13 +126,6 @@ bool KComboBox::autoCompletion() const return completionMode() == KGlobalSettings::CompletionAuto; } -#ifndef KDE_NO_DEPRECATED -void KComboBox::setContextMenuEnabled( bool showMenu ) -{ - if( d->klineEdit ) - d->klineEdit->setContextMenuEnabled( showMenu ); -} -#endif void KComboBox::setUrlDropsEnabled( bool enable ) diff --git a/kdeui/widgets/kcombobox.h b/kdeui/widgets/kcombobox.h index 5ed7b680..01e98e4f 100644 --- a/kdeui/widgets/kcombobox.h +++ b/kdeui/widgets/kcombobox.h @@ -177,20 +177,6 @@ public: */ virtual ~KComboBox(); - /** - * Deprecated to reflect Qt api changes - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void insertURL( const KUrl& url, int index = -1 ) - { insertUrl( index < 0 ? count() : index, url ); } - KDE_DEPRECATED void insertURL( const QPixmap& pixmap, const KUrl& url, int index = -1 ) - { insertUrl( index < 0 ? count() : index, QIcon(pixmap), url ); } - KDE_DEPRECATED void changeURL( const KUrl& url, int index ) - { changeUrl( index, url ); } - KDE_DEPRECATED void changeURL( const QPixmap& pixmap, const KUrl& url, int index ) - { changeUrl( index, QIcon(pixmap), url ); } -#endif /** * Sets @p url into the edit field of the combobox. It uses @@ -274,24 +260,6 @@ public: */ bool autoCompletion() const; - /** - * Enables or disable the popup (context) menu. - * - * This method only works if this widget is editable, i.e. read-write and - * allows you to enable/disable the context menu. It does nothing if invoked - * for a none-editable combo-box. - * - * By default, the context menu is created if this widget is editable. - * Call this function with the argument set to false to disable the popup - * menu. - * - * @param showMenu If @p true, show the context menu. - * @deprecated use setContextMenuPolicy - */ -#ifndef KDE_NO_DEPRECATED - virtual KDE_DEPRECATED void setContextMenuEnabled( bool showMenu ); -#endif - /** * Enables/Disables handling of URL drops. If enabled and the user * drops an URL, the decoded URL will be inserted. Otherwise the default diff --git a/kdeui/widgets/kkeysequencewidget.cpp b/kdeui/widgets/kkeysequencewidget.cpp index d3ce35c2..b3b71480 100644 --- a/kdeui/widgets/kkeysequencewidget.cpp +++ b/kdeui/widgets/kkeysequencewidget.cpp @@ -347,13 +347,6 @@ void KKeySequenceWidget::setClearButtonShown(bool show) d->clearButton->setVisible(show); } -#ifndef KDE_NO_DEPRECATED -void KKeySequenceWidget::setCheckActionList(const QList &checkList) // deprecated -{ - d->checkList = checkList; - Q_ASSERT(d->checkActionCollections.isEmpty()); // don't call this method if you call setCheckActionCollections! -} -#endif void KKeySequenceWidget::setCheckActionCollections(const QList& actionCollections) { diff --git a/kdeui/widgets/kkeysequencewidget.h b/kdeui/widgets/kkeysequencewidget.h index b9aafdc4..a3a62e39 100644 --- a/kdeui/widgets/kkeysequencewidget.h +++ b/kdeui/widgets/kkeysequencewidget.h @@ -226,16 +226,6 @@ public: */ void setCheckActionCollections(const QList& actionCollections); - /** - * @deprecated since 4.1 - * use setCheckActionCollections so that KKeySequenceWidget knows - * in which action collection to call the writeSettings method after stealing - * a shortcut from an action. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setCheckActionList(const QList &checkList); -#endif - /** * If the component using this widget supports shortcuts contexts, it has * to set its component name so we can check conflicts correctly. diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp index a6b6e52e..075f09e5 100644 --- a/kdeui/widgets/klineedit.cpp +++ b/kdeui/widgets/klineedit.cpp @@ -109,9 +109,6 @@ public: // KDE5: remove userTextChanged signal, textEdited does the same... if (!completionRunning && (txt != userText)) { userText = txt; -#ifndef KDE_NO_DEPRECATED - emit q->userTextChanged(txt); -#endif } } @@ -122,9 +119,6 @@ public: if (!completionRunning && (txt != userText)) { userText = txt; q->setModified(true); -#ifndef KDE_NO_DEPRECATED - emit q->userTextChanged(txt); -#endif emit q->textEdited(txt); emit q->textChanged(txt); } @@ -1819,19 +1813,7 @@ void KLineEdit::setClickMessage( const QString &msg ) update(); } -#ifndef KDE_NO_DEPRECATED -void KLineEdit::setContextMenuEnabled( bool showMenu ) -{ - QLineEdit::setContextMenuPolicy( showMenu ? Qt::DefaultContextMenu : Qt::NoContextMenu ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KLineEdit::isContextMenuEnabled() const -{ - return ( contextMenuPolicy() == Qt::DefaultContextMenu ); -} -#endif void KLineEdit::setPasswordMode(bool b) { diff --git a/kdeui/widgets/klineedit.h b/kdeui/widgets/klineedit.h index a844c27c..4a75b095 100644 --- a/kdeui/widgets/klineedit.h +++ b/kdeui/widgets/klineedit.h @@ -152,9 +152,6 @@ class KDEUI_EXPORT KLineEdit : public QLineEdit, public KCompletionBase //krazy: friend class KLineEditStyle; Q_OBJECT -#ifndef KDE_NO_DEPRECATED - Q_PROPERTY( bool contextMenuEnabled READ isContextMenuEnabled WRITE setContextMenuEnabled ) -#endif Q_PROPERTY( bool urlDropsEnabled READ urlDropsEnabled WRITE setUrlDropsEnabled ) Q_PROPERTY( bool trapEnterKeyEvent READ trapReturnKey WRITE setTrapReturnKey ) Q_PROPERTY( bool squeezedTextEnabled READ isSqueezedTextEnabled WRITE setSqueezedTextEnabled ) @@ -208,32 +205,6 @@ public: */ void setCompletionModeDisabled( KGlobalSettings::Completion mode, bool disable = true ); - /** - * Enables/disables the popup (context) menu. - * - * This method only works if this widget is editable, i.e. read-write and - * allows you to enable/disable the context menu. It does nothing if invoked - * for a none-editable combo-box. - * - * By default, the context menu is created if this widget is editable. - * Call this function with the argument set to false to disable the popup - * menu. - * - * @param showMenu If @p true, show the context menu. - * @deprecated use setContextMenuPolicy - */ -#ifndef KDE_NO_DEPRECATED - virtual KDE_DEPRECATED void setContextMenuEnabled( bool showMenu ); -#endif - - /** - * Returns @p true when the context menu is enabled. - * @deprecated use contextMenuPolicy - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isContextMenuEnabled() const; -#endif - /** * Enables/Disables handling of URL drops. If enabled and the user * drops an URL, the decoded URL will be inserted. Otherwise the default @@ -401,22 +372,6 @@ Q_SIGNALS: */ void substringCompletion( const QString& ); - /** - * Emitted when the text is changed NOT by the suggested autocompletion: - * either when the user is physically typing keys, or when the text is changed programmatically, - * for example, by calling setText(). - * But not when automatic completion changes the text temporarily. - * - * @since 4.2.2 - * @deprecated since 4.5. You probably want to connect to textEdited() instead, - * which is emitted whenever the text is actually changed by the user - * (by typing or accepting autocompletion), without side effects from - * suggested autocompletion either. userTextChanged isn't needed anymore. - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void userTextChanged( const QString & ); -#endif - /** * Emitted when the text rotation key-bindings are pressed. * diff --git a/kdeui/widgets/knuminput.cpp b/kdeui/widgets/knuminput.cpp index 519ee9a5..2c0bebb1 100644 --- a/kdeui/widgets/knuminput.cpp +++ b/kdeui/widgets/knuminput.cpp @@ -95,14 +95,6 @@ KNumInput::KNumInput(QWidget* parent) setFocusPolicy(Qt::StrongFocus); } -#ifndef KDE_NO_DEPRECATED -KNumInput::KNumInput(QWidget* parent, KNumInput* below) - : QWidget(parent), d(new KNumInputPrivate(this, below)) -{ - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); - setFocusPolicy(Qt::StrongFocus); -} -#endif KNumInput::~KNumInput() { @@ -335,14 +327,6 @@ public: }; -#ifndef KDE_NO_DEPRECATED -KIntNumInput::KIntNumInput(KNumInput* below, int val, QWidget *parent, int _base) - : KNumInput(parent, below) - , d(new KIntNumInputPrivate(this, val)) -{ - init(val, _base); -} -#endif KIntNumInput::KIntNumInput(QWidget *parent) : KNumInput(parent) @@ -470,13 +454,6 @@ void KIntNumInput::setRange(int lower, int upper, int singleStep) setSliderEnabled(priv->slider); } -#ifndef KDE_NO_DEPRECATED -void KIntNumInput::setRange(int lower, int upper, int singleStep, bool slider) -{ - setRange(lower, upper, singleStep); - setSliderEnabled(slider); -} -#endif void KIntNumInput::setMinimum(int min) { @@ -710,16 +687,6 @@ KDoubleNumInput::KDoubleNumInput(double lower, double upper, double value, QWidg init(value, lower, upper, singleStep, precision); } -#ifndef KDE_NO_DEPRECATED -KDoubleNumInput::KDoubleNumInput(KNumInput *below, - double lower, double upper, double value, QWidget *parent, - double singleStep, int precision) - : KNumInput(parent, below) - , d(new KDoubleNumInputPrivate(value)) -{ - init(value, lower, upper, singleStep, precision); -} -#endif KDoubleNumInput::~KDoubleNumInput() { diff --git a/kdeui/widgets/knuminput.h b/kdeui/widgets/knuminput.h index da11c405..fee49836 100644 --- a/kdeui/widgets/knuminput.h +++ b/kdeui/widgets/knuminput.h @@ -53,15 +53,6 @@ public: */ explicit KNumInput(QWidget* parent=0); - /** - * @param below A pointer to another KNumInput. - * @param parent parent widget - * \deprecated - use the version without the below parameter instead - */ -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED KNumInput(QWidget *parent, KNumInput* below); -#endif - /** * Destructor */ @@ -202,28 +193,6 @@ public: */ explicit KIntNumInput(int value, QWidget *parent=0,int base = 10); - /** - * Constructor - * - * the difference to the one above is the "below" parameter. It tells - * this instance that it is visually put below some other KNumInput widget. - * Note that these two KNumInput's need not to have the same parent widget - * or be in the same layout group. - * The effect is that it'll adjust its layout in correspondence - * with the layout of the other KNumInput's (you can build an arbitrary long - * chain). - * - * @param below append KIntNumInput to the KNumInput chain - * @param value initial value for the control - * @param base numeric base used for display - * @param parent parent QWidget - * - * \deprecated use the version without the below parameter instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED KIntNumInput(KNumInput* below, int value, QWidget *parent, int base = 10); -#endif - /** * Destructor * @@ -272,13 +241,6 @@ public: */ void setRange(int min, int max, int singleStep=1); - /** - * @deprecated Use the other setRange function and setSliderEnabled instead - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setRange(int min, int max, int singleStep, bool slider); -#endif - /** * @param enabled Show the slider * @default enabled @@ -489,33 +451,6 @@ public: virtual ~KDoubleNumInput(); - /** - * Constructor - * - * the difference here is the "below" parameter. It tells this - * instance that it is visually put below some other KNumInput - * widget. Note that these two KNumInput's need not to have the - * same parent widget or be in the same layout group. The effect - * is that it'll adjust its layout in correspondence with the - * layout of the other KNumInput's (you can build an arbitrary long - * chain). - * - * @param below append KDoubleNumInput to the KDoubleNumInput chain - * @param lower lower boundary value - * @param upper upper boundary value - * @param value initial value for the control - * @param singleStep step size to use for up/down arrow clicks - * @param precision number of digits after the decimal point - * @param parent parent QWidget - * - * \deprecated use the version without below instead - */ -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED KDoubleNumInput(KNumInput* below, - double lower, double upper, double value, QWidget *parent=0,double singleStep=0.02, - int precision=2); -#endif - /** * @return the current value. */ @@ -591,9 +526,6 @@ public: */ void setDecimals(int decimals); -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setPrecision(int precision) { setDecimals(precision); } -#endif /** * @return the reference point for relativeValue calculation diff --git a/kdeui/widgets/kratingwidget.cpp b/kdeui/widgets/kratingwidget.cpp index 90a5c6a9..51f1ce93 100644 --- a/kdeui/widgets/kratingwidget.cpp +++ b/kdeui/widgets/kratingwidget.cpp @@ -59,12 +59,6 @@ KRatingWidget::~KRatingWidget() } -#ifndef KDE_NO_DEPRECATED -void KRatingWidget::setPixmap( const QPixmap& pix ) -{ - setCustomPixmap( pix ); -} -#endif void KRatingWidget::setCustomPixmap( const QPixmap& pix ) @@ -151,12 +145,6 @@ bool KRatingWidget::halfStepsEnabled() const } -#ifndef KDE_NO_DEPRECATED -void KRatingWidget::setRating( unsigned int rating ) -{ - setRating( (int)rating ); -} -#endif void KRatingWidget::setRating( int rating ) @@ -171,12 +159,6 @@ void KRatingWidget::setRating( int rating ) } -#ifndef KDE_NO_DEPRECATED -void KRatingWidget::setMaxRating( unsigned int max ) -{ - setMaxRating( (int)max ); -} -#endif void KRatingWidget::setMaxRating( int max ) @@ -193,12 +175,6 @@ void KRatingWidget::setHalfStepsEnabled( bool enabled ) } -#ifndef KDE_NO_DEPRECATED -void KRatingWidget::setOnlyPaintFullSteps( bool fs ) -{ - setHalfStepsEnabled( !fs ); -} -#endif void KRatingWidget::mousePressEvent( QMouseEvent* e ) diff --git a/kdeui/widgets/kratingwidget.h b/kdeui/widgets/kratingwidget.h index 2bdc5d8a..90e1d73c 100644 --- a/kdeui/widgets/kratingwidget.h +++ b/kdeui/widgets/kratingwidget.h @@ -124,13 +124,6 @@ class KDEUI_EXPORT KRatingWidget : public QFrame */ void setRating( int rating ); - /** - * \deprecated use setRating( int rating ) - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setRating( unsigned int rating ); -#endif - /** * Set the maximum allowed rating value. The default is 10 which means * that a rating from 1 to 10 is selectable. If \a max is uneven steps @@ -138,26 +131,12 @@ class KDEUI_EXPORT KRatingWidget : public QFrame */ void setMaxRating( int max ); - /** - * \deprecated use setMaxRating( int max ) - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setMaxRating( unsigned int max ); -#endif - /** * If half steps are enabled (the default) then * one rating step corresponds to half a star. */ void setHalfStepsEnabled( bool enabled ); - /** - * \deprecated Use setHalfStepsEnabled - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setOnlyPaintFullSteps( bool ); -#endif - /** * Set the spacing between the pixmaps. The default is 0. */ @@ -184,16 +163,6 @@ class KDEUI_EXPORT KRatingWidget : public QFrame */ void setCustomPixmap( const QPixmap& pixmap ); - /** - * Set the pixap to be used to display a rating step. - * By default the "rating" pixmap is loaded. - * - * \deprecated use setCustomPixmap - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setPixmap( const QPixmap& ); -#endif - /** * Set the recommended size of the pixmaps. This is * only used for the sizeHint. The actual size is always diff --git a/kdeui/widgets/kruler.cpp b/kdeui/widgets/kruler.cpp index 4c93ed39..5410ed46 100644 --- a/kdeui/widgets/kruler.cpp +++ b/kdeui/widgets/kruler.cpp @@ -187,33 +187,9 @@ KRuler::~KRuler() delete d; } -#ifndef KDE_NO_DEPRECATED -void -KRuler::setMinValue(int value) -{ - setMinimum(value); -} -#endif -#ifndef KDE_NO_DEPRECATED -int -KRuler::minValue() const -{ return minimum(); } -#endif -#ifndef KDE_NO_DEPRECATED -void -KRuler::setMaxValue(int value) -{ - setMaximum(value); -} -#endif -#ifndef KDE_NO_DEPRECATED -int -KRuler::maxValue() const -{ return maximum(); } -#endif void KRuler::setTinyMarkDistance(int dist) diff --git a/kdeui/widgets/kruler.h b/kdeui/widgets/kruler.h index 84d8591d..91e40d33 100644 --- a/kdeui/widgets/kruler.h +++ b/kdeui/widgets/kruler.h @@ -152,42 +152,6 @@ public: */ ~KRuler(); - /** - * Sets the minimal value of the ruler pointer (default is 0). - * - * This method calls update() so that the widget is painted after leaving - * to the main event loop. - * - **/ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setMinValue(int); -#endif - - /** - * Returns the minimal value of the ruler pointer. - **/ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED int minValue() const; -#endif - - /** - * Sets the maximum value of the ruler pointer (default is 100). - * - * This method calls update() so that the widget is painted after leaving - * to the main event loop. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setMaxValue(int); -#endif - - /** - * Returns the maximal value of the ruler pointer. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED int maxValue() const; -#endif - - /** * Sets the distance between tiny marks. * diff --git a/kdeui/widgets/kshortcutwidget.cpp b/kdeui/widgets/kshortcutwidget.cpp index b9e318c1..4b1c113e 100644 --- a/kdeui/widgets/kshortcutwidget.cpp +++ b/kdeui/widgets/kshortcutwidget.cpp @@ -85,13 +85,6 @@ KShortcut KShortcutWidget::shortcut() const return ret; } -#ifndef KDE_NO_DEPRECATED -void KShortcutWidget::setCheckActionList(const QList &checkList) -{ - d->ui.priEditor->setCheckActionList(checkList); - d->ui.altEditor->setCheckActionList(checkList); -} -#endif void KShortcutWidget::setCheckActionCollections(const QList& actionCollections) { diff --git a/kdeui/widgets/kshortcutwidget.h b/kdeui/widgets/kshortcutwidget.h index 69f7fcbe..7d52095a 100644 --- a/kdeui/widgets/kshortcutwidget.h +++ b/kdeui/widgets/kshortcutwidget.h @@ -58,16 +58,6 @@ public: */ void setCheckActionCollections(const QList& actionCollections); - /** - * @deprecated since 4.1 - * Use setCheckActionCollections so that KShortcutWidget knows - * in which action collection to call the writeSettings method after stealing - * a shortcut from an action. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setCheckActionList(const QList &checkList); -#endif - Q_SIGNALS: void shortcutChanged(const KShortcut &cut); diff --git a/kdeui/widgets/ktabbar.cpp b/kdeui/widgets/ktabbar.cpp index 97b626be..c273f75f 100644 --- a/kdeui/widgets/ktabbar.cpp +++ b/kdeui/widgets/ktabbar.cpp @@ -62,9 +62,6 @@ KTabBar::KTabBar( QWidget *parent ) d->mActivateDragSwitchTabTimer = new QTimer( this ); d->mActivateDragSwitchTabTimer->setSingleShot( true ); connect( d->mActivateDragSwitchTabTimer, SIGNAL(timeout()), SLOT(activateDragSwitchTab()) ); -#ifndef KDE_NO_DEPRECATED - connect( this, SIGNAL(tabCloseRequested(int)), this, SIGNAL(closeRequest(int))); // just for backward compatibility, KDE5 remove -#endif //connect( this, SIGNAL(layoutChanged()), SLOT(onLayoutChange()) ); } @@ -84,9 +81,6 @@ void KTabBar::mouseDoubleClickEvent( QMouseEvent *event ) if(tab == -1) { emit newTabRequest(); } else { -#ifndef KDE_NO_DEPRECATED - emit mouseDoubleClick( tab ); //deprecated -#endif emit tabDoubleClicked( tab ); } @@ -174,20 +168,8 @@ void KTabBar::mouseMoveEvent( QMouseEvent *event ) } -#ifndef KDE_NO_DEPRECATED -void KTabBar::closeButtonClicked() -{ - // deprecated -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabBar::enableCloseButton() -{ - // deprecated -} -#endif void KTabBar::activateDragSwitchTab() @@ -341,80 +323,16 @@ void KTabBar::wheelEvent( QWheelEvent *event ) } #endif -#ifndef KDE_NO_DEPRECATED -bool KTabBar::isTabReorderingEnabled() const -{ - return d->mTabReorderingEnabled; -} -#endif - -#ifndef KDE_NO_DEPRECATED -void KTabBar::setTabReorderingEnabled( bool on ) -{ - d->mTabReorderingEnabled = on; -} -#endif - -#ifndef KDE_NO_DEPRECATED -bool KTabBar::tabCloseActivatePrevious() const -{ - return selectionBehaviorOnRemove() == QTabBar::SelectPreviousTab; -} -#endif - -#ifndef KDE_NO_DEPRECATED -void KTabBar::setTabCloseActivatePrevious( bool on ) -{ - setSelectionBehaviorOnRemove(on ? QTabBar::SelectPreviousTab : QTabBar::SelectRightTab); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabBar::setHoverCloseButton( bool button ) -{ - // deprecated - setTabsClosable(button); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabBar::hoverCloseButton() const -{ - // deprecated - return tabsClosable(); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabBar::setHoverCloseButtonDelayed( bool delayed ) -{ - // deprecated - Q_UNUSED( delayed ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabBar::hoverCloseButtonDelayed() const -{ - // deprecated - return false; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabBar::setCloseButtonEnabled( bool enable ) -{ - QTabBar::setTabsClosable(enable); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabBar::isCloseButtonEnabled() const -{ - return QTabBar::tabsClosable(); -} -#endif + + + void KTabBar::tabLayoutChange() { diff --git a/kdeui/widgets/ktabbar.h b/kdeui/widgets/ktabbar.h index 94a5cc68..79b77973 100644 --- a/kdeui/widgets/ktabbar.h +++ b/kdeui/widgets/ktabbar.h @@ -48,108 +48,6 @@ class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses */ virtual ~KTabBar(); - /** - * Sets the tab reordering enabled or disabled. If enabled, - * the user can reorder the tabs by drag and drop the tab - * headers with the middle mouse button. - * - * @deprecated Use QTabBar::setMovable() instead. - * - * Note, however, that QTabBar::setMovable(true) disables - * dragging tabs out of the KTabBar (e.g., dragging the tab - * URL from Konqueror to another application)! - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setTabReorderingEnabled( bool enable ); -#endif - - /** - * Returns whether tab reordering is enabled. - * - * @deprecated Use QTabBar::isMovable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isTabReorderingEnabled() const; -#endif - - /** - * If enabled, a close button is shown above the tab icon. - * The signal KTabBar::closeRequest() is emitted, if the - * close button has been clicked. Note that the tab must have - * an icon to use this feature. - * - * @deprecated Use QTabBar::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setHoverCloseButton( bool ); -#endif - - /** @deprecated Use QTabBar::tabsClosable() instead. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool hoverCloseButton() const; -#endif - - /** - * If enabled, the close button cannot get clicked until a - * minor delay has been passed. This prevents that user - * accidentally closes a tab. - * - * @deprecated Use QTabBar::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setHoverCloseButtonDelayed( bool ); -#endif - - /** @deprecated Use QTabBar::tabsClosable() instead. */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool hoverCloseButtonDelayed() const; -#endif - - /** - * If enabled, a close button is available for each tab. The - * signal KTabBar::closeRequest() is emitted, if the close button - * has been clicked. - * - * @since 4.1 - * - * @deprecated Use QTabBar::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setCloseButtonEnabled( bool ); -#endif - - /** - * Returns true if the close button is shown on tabs. - * - * @since 4.1 - * - * @deprecated Use QTabBar::tabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isCloseButtonEnabled() const; -#endif - - /** - * Sets the 'activate previous tab on close' feature enabled - * or disabled. If enabled, as soon as you close a tab, the - * previously selected tab is activated again. - * - * @deprecated Use QTabBar::setSelectionBehaviorOnRemove() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setTabCloseActivatePrevious( bool ); -#endif - - /** - * Returns whether the 'activate previous tab on close' feature - * is enabled. - * - * @deprecated Use QTabBar::selectionBehaviorOnRemove() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool tabCloseActivatePrevious() const; -#endif - /** * Selects the tab which has a tab header at * given @param position. @@ -169,10 +67,6 @@ class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses * The signal is emitted on the press of the mouse button. */ void emptyAreaContextMenu( const QPoint& globalPos ); - /** @deprecated use tabDoubleClicked(int) and newTabRequest() instead. */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void mouseDoubleClick( int ); -#endif /** * A double left mouse button click was performed over the tab with the @param index. * The signal is emitted on the second press of the mouse button, before the release. @@ -196,10 +90,6 @@ class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses * Tells the KTabWidget which owns the KTabBar to move a tab. */ void moveTab( int, int ); - /** @deprecated Use QTabBar::tabCloseRequested(int) instead. */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void closeRequest( int ); -#endif #ifndef QT_NO_WHEELEVENT void wheelDelta( int ); #endif @@ -222,14 +112,6 @@ class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses virtual QSize tabSizeHint( int index ) const; protected Q_SLOTS: - /** @deprecated */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void closeButtonClicked(); -#endif - /** @deprecated */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void enableCloseButton(); -#endif virtual void activateDragSwitchTab(); protected: diff --git a/kdeui/widgets/ktabwidget.cpp b/kdeui/widgets/ktabwidget.cpp index 504e430b..d4ce5314 100644 --- a/kdeui/widgets/ktabwidget.cpp +++ b/kdeui/widgets/ktabwidget.cpp @@ -316,33 +316,9 @@ QColor KTabWidget::tabTextColor( int index ) const return tabBar()->tabTextColor( index ); } -#ifndef KDE_NO_DEPRECATED -void KTabWidget::setTabReorderingEnabled( bool on) -{ - static_cast(tabBar())->setTabReorderingEnabled( on ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabWidget::isTabReorderingEnabled() const -{ - return static_cast(tabBar())->isTabReorderingEnabled(); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabWidget::setTabCloseActivatePrevious( bool previous) -{ - static_cast(tabBar())->setTabCloseActivatePrevious( previous ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabWidget::tabCloseActivatePrevious() const -{ - return static_cast(tabBar())->tabCloseActivatePrevious(); -} -#endif int KTabWidget::tabBarWidthForMaxChars( int maxLength ) { @@ -361,12 +337,6 @@ int KTabWidget::tabBarWidthForMaxChars( int maxLength ) if ( !tabBar()->tabIcon( i ).isNull() ) { iw = tabBar()->tabIcon( i ).pixmap( style()->pixelMetric( QStyle::PM_SmallIconSize ), QIcon::Normal ).width() + 4; } -#ifndef KDE_NO_DEPRECATED - if ( isCloseButtonEnabled() ) { - // FIXME: how to get the size of the close button directly from the tabBar()? - iw += KIconLoader::SizeSmall * 3 / 2; - } -#endif x += ( tabBar()->style()->sizeFromContents( QStyle::CT_TabBarTab, 0L, QSize( qMax( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ), this ) ).width(); @@ -592,9 +562,6 @@ void KTabWidget::moveTab( int from, int to ) setUpdatesEnabled(true); -#ifndef KDE_NO_DEPRECATED - emit ( movedTab( from, to ) ); -#endif } void KTabWidget::removePage( QWidget *widget ) @@ -622,51 +589,11 @@ void KTabWidget::removeTab( int index ) } } -#ifndef KDE_NO_DEPRECATED -void KTabWidget::setHoverCloseButton( bool button ) -{ - // deprecated - setTabsClosable( button ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabWidget::hoverCloseButton() const -{ - // deprecated - return false; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabWidget::setHoverCloseButtonDelayed( bool delayed ) -{ - // deprecated - Q_UNUSED( delayed ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabWidget::hoverCloseButtonDelayed() const -{ - // deprecated - return tabsClosable(); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KTabWidget::setCloseButtonEnabled( bool enable ) -{ - static_cast( tabBar() )->setTabsClosable( enable ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KTabWidget::isCloseButtonEnabled() const -{ - return static_cast( tabBar() )->tabsClosable(); -} -#endif void KTabWidget::setAutomaticResizeTabs( bool enabled ) { @@ -716,11 +643,4 @@ void KTabWidget::tabRemoved( int idx ) // d->m_tabNames is now updated in KTabWidget::Private::removeTab() } -/* This function is kept only for BC reasons, it is not useful anymore */ -#ifndef KDE_NO_DEPRECATED -void KTabWidget::currentChanged( int ) -{ -} -#endif - #include "moc_ktabwidget.cpp" diff --git a/kdeui/widgets/ktabwidget.h b/kdeui/widgets/ktabwidget.h index f4a8d94e..c16e28a7 100644 --- a/kdeui/widgets/ktabwidget.h +++ b/kdeui/widgets/ktabwidget.h @@ -44,13 +44,6 @@ class QTab; class KDEUI_EXPORT KTabWidget : public QTabWidget //krazy:exclude=qclasses { Q_OBJECT -#ifndef KDE_NO_DEPRECATED - Q_PROPERTY( bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled ) - Q_PROPERTY( bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton ) - Q_PROPERTY( bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed ) - Q_PROPERTY( bool closeButtonEnabled READ isCloseButtonEnabled WRITE setCloseButtonEnabled ) - Q_PROPERTY( bool tabCloseActivatePrevious READ tabCloseActivatePrevious WRITE setTabCloseActivatePrevious ) -#endif Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs ) public: @@ -80,57 +73,6 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget //krazy:exclude=qclasses */ QColor tabTextColor( int index ) const; - /** - * Returns true if tab ordering with the middle mouse button - * has been enabled. - * - * @deprecated Use QTabWidget::isMovable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isTabReorderingEnabled() const; -#endif - - /** - * Returns true if the close button is shown on tabs - * when mouse is hovering over them. - * - * @deprecated Use QTabWidget::tabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool hoverCloseButton() const; -#endif - - /** - * Returns true if the close button is shown on tabs - * after a delay. - * - * @deprecated Use QTabWidget::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool hoverCloseButtonDelayed() const; -#endif - - /** - * Returns true if the close button is shown on tabs. - * - * @since 4.1 - * - * @deprecated Use QTabWidget::tabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isCloseButtonEnabled() const; -#endif - - /** - * Returns true if closing the current tab activates the previous - * actice tab instead of the one to the right. - * - * @deprecated Use tabBar()->selectionBehaviorOnRemove() instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool tabCloseActivatePrevious() const; -#endif - /** * Returns true if calling setTitle() will resize tabs * to the width of the tab bar. @@ -198,69 +140,6 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget //krazy:exclude=qclasses */ virtual void removeTab(int index); // but it's not virtual in QTabWidget... - /** - * If \a enable is true, tab reordering with middle button will be enabled. - * - * Note that once enabled you shouldn't rely on previously queried - * currentPageIndex() or indexOf( QWidget * ) values anymore. - * - * You can connect to signal movedTab(int, int) which will notify - * you from which index to which index a tab has been moved. - * - * @deprecated Use QTabWidget::setMovable() instead. - * - * Note, however, that QTabWidget::setMovable(true) disables - * dragging tabs out of the KTabBar (e.g., dragging the tab - * URL from Konqueror to another application)! - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void setTabReorderingEnabled( bool enable ); -#endif - - /** - * If \a enable is true, a close button will be shown on mouse hover - * over tab icons which will emit signal closeRequest( QWidget * ) - * when pressed. - * - * @deprecated Use QTabWidget::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void setHoverCloseButton( bool enable ); -#endif - - /** - * If \a delayed is true, a close button will be shown on mouse hover - * over tab icons after mouse double click delay else immediately. - * - * @deprecated Use QTabWidget::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void setHoverCloseButtonDelayed( bool delayed ); -#endif - - /** - * If enabled, a close button is available for each tab. The - * signal KTabWidget::closeRequest() is emitted, if the close button - * has been clicked. - * - * @since 4.1 - * - * @deprecated Use QTabWidget::setTabsClosable() instead. - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void setCloseButtonEnabled( bool ); -#endif - - /** - * If \a previous is true, closing the current tab activates the - * previous active tab instead of the one to the right. - * - * @deprecated Use tabBar()->setSelectionBehaviorOnRemove() instead. - */ -#ifndef KDE_NO_DEPRECATED - QT_MOC_COMPAT void setTabCloseActivatePrevious( bool previous ); -#endif - /** * If \a enable is true, tabs will be resized to the width of the tab bar. * @@ -302,13 +181,6 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget //krazy:exclude=qclasses */ void contextMenu( QWidget *, const QPoint & ); -#ifndef KDE_NO_DEPRECATED - /** - * A tab was moved from first to second index. This signal is only - * possible after you have called setTabReorderingEnabled( true ). - */ - void movedTab( int, int ); -#endif /** * A double left mouse button click was performed over empty space besides tabbar. @@ -355,13 +227,6 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget //krazy:exclude=qclasses virtual void tabInserted( int ); virtual void tabRemoved ( int ); - /** - * @deprecated This method has no effect and should not be called - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void currentChanged( int ); -#endif - protected Q_SLOTS: virtual void receivedDropEvent( int, QDropEvent* ); virtual void initiateDrag( int ); diff --git a/kdeui/widgets/ktoolbar.cpp b/kdeui/widgets/ktoolbar.cpp index 1664682e..304e4ca8 100644 --- a/kdeui/widgets/ktoolbar.cpp +++ b/kdeui/widgets/ktoolbar.cpp @@ -92,9 +92,6 @@ class KToolBar::Private Private(KToolBar *qq) : q(qq), isMainToolBar(false), -#ifndef KDE_NO_DEPRECATED - enableContext(true), -#endif unlockedMovable(true), contextOrient(0), contextMode(0), @@ -148,9 +145,6 @@ class KToolBar::Private KToolBar *q; bool isMainToolBar : 1; -#ifndef KDE_NO_DEPRECATED - bool enableContext : 1; -#endif bool unlockedMovable : 1; static bool s_editable; static bool s_locked; @@ -811,19 +805,7 @@ KToolBar::~KToolBar() delete d; } -#ifndef KDE_NO_DEPRECATED -void KToolBar::setContextMenuEnabled(bool enable) -{ - d->enableContext = enable; -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KToolBar::contextMenuEnabled() const -{ - return d->enableContext; -} -#endif void KToolBar::saveSettings(KConfigGroup &cg) { @@ -853,13 +835,6 @@ void KToolBar::saveSettings(KConfigGroup &cg) } } -#ifndef KDE_NO_DEPRECATED -void KToolBar::setXMLGUIClient(KXMLGUIClient *client) -{ - d->xmlguiClients.clear(); - d->xmlguiClients << client; -} -#endif void KToolBar::addXMLGUIClient( KXMLGUIClient *client ) { @@ -873,19 +848,6 @@ void KToolBar::removeXMLGUIClient( KXMLGUIClient *client ) void KToolBar::contextMenuEvent(QContextMenuEvent* event) { -#ifndef KDE_NO_DEPRECATED - if (mainWindow() && d->enableContext) { - QPointer guard(this); - const QPoint globalPos = event->globalPos(); - d->contextMenu(globalPos)->exec(globalPos); - - // "Configure Toolbars" recreates toolbars, so we might not exist anymore. - if (guard) { - d->slotContextAboutToHide(); - } - return; - } -#endif QToolBar::contextMenuEvent(event); } diff --git a/kdeui/widgets/ktoolbar.h b/kdeui/widgets/ktoolbar.h index f83417bb..34a4e453 100644 --- a/kdeui/widgets/ktoolbar.h +++ b/kdeui/widgets/ktoolbar.h @@ -127,48 +127,13 @@ public: */ int iconSizeDefault() const; // KDE5: hide from public API. Doesn't make sense to export this, and it isn't used. - /** - * This allows you to enable or disable the context menu. - * - * @param enable If false, then the context menu will be disabled - * @deprecated use setContextMenuPolicy - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setContextMenuEnabled( bool enable = true ); -#endif - - /** - * Returns the context menu enabled flag - * @return true if the context menu is disabled - * @deprecated use contextMenuPolicy - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool contextMenuEnabled() const; -#endif - /** * Save the toolbar settings to group @p configGroup in @p config. */ void saveSettings( KConfigGroup &cg ); - /** - * Read the toolbar settings from group @p configGroup in @p config - * and apply them. - * - * @param forceGlobal is deprecated. In kde3 it used to mean - * "force global settings, i.e. ignore @p cg", but only for visibility/position/index, - * not for icon size etc. Only visibility is still controlled by this. - */ void applySettings( const KConfigGroup &cg, bool forceGlobal = false ); - /** - * Sets the XML gui client. - * @deprecated use addXMLGUIClient. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setXMLGUIClient( KXMLGUIClient *client ); -#endif - /** * Adds an XML gui client that uses this toolbar * @since 4.8.1 diff --git a/kdewebkit/kgraphicswebview.h b/kdewebkit/kgraphicswebview.h index c30b328e..602462e2 100644 --- a/kdewebkit/kgraphicswebview.h +++ b/kdewebkit/kgraphicswebview.h @@ -117,9 +117,6 @@ Q_SIGNALS: * @deprecated use selectionClipboardUrlPasted(KUrl, bool) instead * @see QClipboard */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url); -#endif /** * Emitted when a URL from the selection clipboard is pasted on this view. diff --git a/kdewebkit/kwebview.h b/kdewebkit/kwebview.h index f3149222..c4835520 100644 --- a/kdewebkit/kwebview.h +++ b/kdewebkit/kwebview.h @@ -118,9 +118,6 @@ Q_SIGNALS: * @deprecated use selectionClipboardUrlPasted(KUrl, bool) instead * @see QClipboard */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url); -#endif /** * Emitted when a URL from the selection clipboard is pasted on this view. diff --git a/kdewebkit/kwebview_p.h b/kdewebkit/kwebview_p.h index 8edcdc60..ec2e9413 100644 --- a/kdewebkit/kwebview_p.h +++ b/kdewebkit/kwebview_p.h @@ -126,18 +126,12 @@ public: case KUriFilterData::LocalDir: case KUriFilterData::NetProtocol: emit q->selectionClipboardUrlPasted(data.uri(), QString()); -#ifndef KDE_NO_DEPRECATED - emit q->selectionClipboardUrlPasted(data.uri()); -#endif return true; default: break; } } else if (KUriFilter::self()->filterSearchUri(data, KUriFilter::NormalTextFilter)) { emit q->selectionClipboardUrlPasted(data.uri(), clipboardText); -#ifndef KDE_NO_DEPRECATED - emit q->selectionClipboardUrlPasted(data.uri()); -#endif return true; } } diff --git a/kfile/kurlnavigator.cpp b/kfile/kurlnavigator.cpp index 7af53dbe..bcbb6263 100644 --- a/kfile/kurlnavigator.cpp +++ b/kfile/kurlnavigator.cpp @@ -58,10 +58,6 @@ using namespace KDEPrivate; struct LocationData { KUrl url; -#ifndef KDE_NO_DEPRECATED - KUrl rootUrl; // KDE5: remove after the deprecated methods have been removed - QPoint pos; // KDE5: remove after the deprecated methods have been removed -#endif QByteArray state; }; @@ -407,11 +403,6 @@ void KUrlNavigator::Private::dropUrls(const KUrl& destination, QDropEvent* event if (!urls.isEmpty()) { emit q->urlsDropped(destination, event); -#ifndef KDE_NO_DEPRECATED - // KDE5: remove, as the signal has been replaced by - // urlsDropped(const KUrl& destination, QDropEvent* event) - emit q->urlsDropped(urls, destination); -#endif } } @@ -1082,29 +1073,8 @@ void KUrlNavigator::setFocus() } } -#ifndef KDE_NO_DEPRECATED -void KUrlNavigator::setUrl(const KUrl& url) -{ - // deprecated - setLocationUrl(url); -} -#endif -#ifndef KDE_NO_DEPRECATED -void KUrlNavigator::saveRootUrl(const KUrl& url) -{ - // deprecated - d->m_history[d->m_historyIndex].rootUrl = url; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KUrlNavigator::savePosition(int x, int y) -{ - // deprecated - d->m_history[d->m_historyIndex].pos = QPoint(x, y); -} -#endif void KUrlNavigator::keyPressEvent(QKeyEvent* event) { @@ -1203,62 +1173,10 @@ QStringList KUrlNavigator::customProtocols() const return d->m_customProtocols; } -#ifndef KDE_NO_DEPRECATED -const KUrl& KUrlNavigator::url() const -{ - // deprecated - // Workaround required because of flawed interface ('const KUrl&' is returned - // instead of 'KUrl'): remember the URL to prevent a dangling pointer - static KUrl url; - url = locationUrl(); - return url; -} -#endif -#ifndef KDE_NO_DEPRECATED -KUrl KUrlNavigator::url(int index) const -{ - // deprecated - return d->buttonUrl(index); -} -#endif -#ifndef KDE_NO_DEPRECATED -KUrl KUrlNavigator::historyUrl(int historyIndex) const -{ - // deprecated - return locationUrl(historyIndex); -} -#endif -#ifndef KDE_NO_DEPRECATED -const KUrl& KUrlNavigator::savedRootUrl() const -{ - // deprecated - // Workaround required because of flawed interface ('const KUrl&' is returned - // instead of 'KUrl'): remember the root URL to prevent a dangling pointer - static KUrl rootUrl; - rootUrl = d->m_history[d->m_historyIndex].rootUrl; - return rootUrl; -} -#endif - -#ifndef KDE_NO_DEPRECATED -QPoint KUrlNavigator::savedPosition() const -{ - // deprecated - return d->m_history[d->m_historyIndex].pos; -} -#endif - -#ifndef KDE_NO_DEPRECATED -void KUrlNavigator::setHomeUrl(const QString& homeUrl) -{ - // deprecated - setLocationUrl(KUrl(homeUrl)); -} -#endif #include "moc_kurlnavigator.cpp" diff --git a/kfile/kurlnavigator.h b/kfile/kurlnavigator.h index 3207b7f3..3c294bcf 100644 --- a/kfile/kurlnavigator.h +++ b/kfile/kurlnavigator.h @@ -277,49 +277,6 @@ public: */ QStringList customProtocols() const; -#if !defined(KDE_NO_DEPRECATED) && !defined(DOXYGEN_SHOULD_SKIP_THIS) - /** - * @return The current URL of the location. - * @deprecated Use KUrlNavigator::locationUrl() instead. - */ - KDE_DEPRECATED const KUrl& url() const; - - /** - * @return The portion of the current URL up to the path part given - * by \a index. Assuming that the current URL is /home/peter/Documents/Music, - * then the following URLs are returned for an index: - * - index <= 0: /home - * - index is 1: /home/peter - * - index is 2: /home/peter/Documents - * - index >= 3: /home/peter/Documents/Music - * @deprecated It should not be necessary for a client of KUrlNavigator to query this information. - */ - KDE_DEPRECATED KUrl url(int index) const; - - /** - * @return URL for the history element with the index \a historyIndex. - * The history index 0 represents the most recent URL. - * @since 4.3 - * @deprecated Use KUrlNavigator::locationUrl(historyIndex) instead. - */ - KDE_DEPRECATED KUrl historyUrl(int historyIndex) const; - - /** - * @return The saved root URL for the current URL (see KUrlNavigator::saveRootUrl()). - * @deprecated Use KUrlNavigator::locationState() instead. - */ - KDE_DEPRECATED const KUrl& savedRootUrl() const; - - /** - * @return The saved contents position of the upper left corner - * for the current URL. - * @deprecated Use KUrlNavigator::locationState() instead. - */ - KDE_DEPRECATED QPoint savedPosition() const; - - /** @deprecated Use setHomeUrl(const KUrl& url) instead. */ - KDE_DEPRECATED void setHomeUrl(const QString& homeUrl); -#endif public Q_SLOTS: /** @@ -343,25 +300,6 @@ public Q_SLOTS: void setFocus(); #endif -#if !defined(KDE_NO_DEPRECATED) && !defined(DOXYGEN_SHOULD_SKIP_THIS) - /** - * Sets the location to \a url. - * @deprecated Use KUrlNavigator::setLocationUrl(url). - */ - KDE_DEPRECATED void setUrl(const KUrl& url); - - /** - * Saves the used root URL of the content for the current history element. - * @deprecated Use KUrlNavigator::saveLocationState() instead. - */ - KDE_DEPRECATED void saveRootUrl(const KUrl& url); - - /** - * Saves the coordinates of the contents for the current history element. - * @deprecated Use KUrlNavigator::saveLocationState() instead. - */ - KDE_DEPRECATED void savePosition(int x, int y); -#endif Q_SIGNALS: /** @@ -419,19 +357,6 @@ Q_SIGNALS: */ void tabRequested(const KUrl& url); -#if !defined(KDE_NO_DEPRECATED) && !defined(DOXYGEN_SHOULD_SKIP_THIS) - /** - * Is emitted if the URLs \a urls have been dropped - * to the destination \a destination. - * @deprecated Use - * KUrlNavigator::urlsDropped(const KUrl& destination, QDropEvent* event) - * instead. - */ - // KDE5: remove, as the signal has been replaced by - // urlsDropped(const KUrl& destination, QDropEvent* event) - KDE_DEPRECATED void urlsDropped(const KUrl::List& urls, - const KUrl& destination); -#endif protected: #if !defined(DOXYGEN_SHOULD_SKIP_THIS) diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp index a80c8410..4e9ff447 100644 --- a/kinit/klauncher.cpp +++ b/kinit/klauncher.cpp @@ -750,9 +750,6 @@ KLauncher::start_service_by_name(const QString &serviceName, const QStringList & { KService::Ptr service; // Find service -#ifndef KDE_NO_DEPRECATED - service = KService::serviceByName(serviceName); -#endif if (!service) { requestResult.result = ENOENT; diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc index a2585654..21931d13 100644 --- a/kio/bookmarks/kbookmark.cc +++ b/kio/bookmarks/kbookmark.cc @@ -179,12 +179,6 @@ KBookmark KBookmarkGroup::createNewSeparator() return KBookmark(sepElem); } -#ifndef KDE_NO_DEPRECATED -bool KBookmarkGroup::moveItem( const KBookmark & bookmark, const KBookmark & after ) -{ - return moveBookmark(bookmark, after); -} -#endif bool KBookmarkGroup::moveBookmark( const KBookmark & item, const KBookmark & after ) { @@ -696,14 +690,6 @@ QStringList KBookmark::List::mimeDataTypes() return QStringList()<<("application/x-xbel")<setValidator(m_validator); } -#ifndef KDE_NO_DEPRECATED - // make sure that an uint cannot be set to a value < 0 - if (d->m_item.properties().type() == QVariant::UInt) - sb->setMinimum(qMax(sb->minimum(), 0)); -#endif connect(sb, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); return sb; @@ -307,19 +302,6 @@ QWidget* KFileMetaInfoWidget::makeStringWidget() return b; } -#ifndef KDE_NO_DEPRECATED - if (d->m_item.properties().attributes() & PredicateProperties::MultiLine) { - KTextEdit *edit = new KTextEdit( this ); - edit->setAcceptRichText(false); - edit->setPlainText(d->m_item.value().toString()); - connect( edit, SIGNAL(textChanged()), - this, SLOT(slotMultiLineEditChanged())); - // can't use a validator with a KTextEdit, but we may need to delete it - if (d->m_validator) - reparentValidator(edit, d->m_validator); - return edit; - } -#endif KLineEdit* e = new KLineEdit(d->m_item.value().toString(), this); if (d->m_validator) { diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 40a8104c..2db1f01b 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -447,7 +447,6 @@ void KIconDialog::KIconDialogPrivate::init() KIconLoader::Device, KIconLoader::Emblem, KIconLoader::Emote, - KIconLoader::FileSystem, KIconLoader::International, KIconLoader::MimeType, KIconLoader::Place, diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index f8632741..8bf81347 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -606,12 +606,6 @@ KPropertiesDialogPlugin::~KPropertiesDialogPlugin() delete d; } -#ifndef KDE_NO_DEPRECATED -bool KPropertiesDialogPlugin::isDesktopFile( const KFileItem& _item ) -{ - return _item.isDesktopFile(); -} -#endif void KPropertiesDialogPlugin::setDirty( bool b ) { diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h index 7656c795..d80b8191 100644 --- a/kio/kfile/kpropertiesdialog.h +++ b/kio/kfile/kpropertiesdialog.h @@ -368,9 +368,6 @@ public: * @return true if the file is a local, regular, readable, desktop file * @deprecated use KFileItem::isDesktopFile */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool isDesktopFile( const KFileItem& _item ); -#endif void setDirty( bool b ); bool isDirty() const; diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp index c08b3ba5..02a72526 100644 --- a/kio/kfile/kurlrequester.cpp +++ b/kio/kfile/kurlrequester.cpp @@ -194,11 +194,7 @@ public: KComboBox *combo; KFile::Modes fileDialogMode; QString fileDialogFilter; -#ifndef KDE_NO_DEPRECATED - KEditListBox::CustomEditor editor; -#else KEditListWidget::CustomEditor editor; -#endif KUrlDragPushButton *myButton; KFileDialog *myFileDialog; KUrlCompletion *myCompletion; @@ -289,12 +285,6 @@ void KUrlRequester::setUrl( const KUrl& url ) d->setText( url.pathOrUrl() ); } -#ifndef KDE_NO_DEPRECATED -void KUrlRequester::setPath( const QString& path ) -{ - d->setText( path ); -} -#endif void KUrlRequester::setText(const QString& text) { @@ -527,11 +517,7 @@ void KUrlRequester::setFileDialogModality(Qt::WindowModality modality) d->fileDialogModality = modality; } -#ifndef KDE_NO_DEPRECATED -const KEditListBox::CustomEditor &KUrlRequester::customEditor() -#else const KEditListWidget::CustomEditor &KUrlRequester::customEditor() -#endif { setSizePolicy(QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed)); diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h index 59daf5fe..5f3802ca 100644 --- a/kio/kfile/kurlrequester.h +++ b/kio/kfile/kurlrequester.h @@ -24,11 +24,7 @@ #include #include -#ifndef KDE_NO_DEPRECATED -#include -#else #include -#endif class KComboBox; class KFileDialog; @@ -187,11 +183,7 @@ public: * KEditListWidget *editListWidget = new KEditListWidget( req->customEditor(), someWidget ); * \endcode */ -#ifndef KDE_NO_DEPRECATED - const KEditListBox::CustomEditor &customEditor(); -#else const KEditListWidget::CustomEditor &customEditor(); -#endif /** * @returns the message set with setClickMessage @@ -231,18 +223,6 @@ public Q_SLOTS: */ void setStartDir( const KUrl& startDir ); - /** - * Sets the url in the lineedit to @p KUrl::fromPath(path). - * This is only for local paths; do not pass a url here. - * This method is mostly for "local paths only" url requesters, - * for instance those set up with setMode(KFile::File|KFile::ExistingOnly|KFile::LocalOnly) - * - * @deprecated Use setUrl(KUrl(path)) instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setPath(const QString& path); -#endif - /** * Sets the current text in the lineedit or combobox. * This is used for cases where KUrlRequester is used to diff --git a/kio/kio/accessmanager.cpp b/kio/kio/accessmanager.cpp index 456a7272..aeda21e9 100644 --- a/kio/kio/accessmanager.cpp +++ b/kio/kio/accessmanager.cpp @@ -134,22 +134,6 @@ bool AccessManager::isExternalContentAllowed() const return d->externalContentAllowed; } -#ifndef KDE_NO_DEPRECATED -void AccessManager::setCookieJarWindowId(WId id) -{ - QWidget* window = QWidget::find(id); - if (!window) { - return; - } - - KIO::Integration::CookieJar *jar = qobject_cast (cookieJar()); - if (jar) { - jar->setWindowId(id); - } - - d->window = window->isWindow() ? window : window->window(); -} -#endif void AccessManager::setWindow(QWidget* widget) { @@ -169,16 +153,6 @@ void AccessManager::setWindow(QWidget* widget) } } -#ifndef KDE_NO_DEPRECATED -WId AccessManager::cookieJarWindowid() const -{ - KIO::Integration::CookieJar *jar = qobject_cast (cookieJar()); - if (jar) - return jar->windowId(); - - return 0; -} -#endif QWidget* AccessManager::window() const { diff --git a/kio/kio/accessmanager.h b/kio/kio/accessmanager.h index 9759afff..5bb599a0 100644 --- a/kio/kio/accessmanager.h +++ b/kio/kio/accessmanager.h @@ -106,26 +106,6 @@ public: */ bool isExternalContentAllowed() const; - /** - * Sets the cookiejar's window id to @p id. - * - * This is a convenience function that allows you to set the cookiejar's - * window id. Note that this function does nothing unless the cookiejar in - * use is of type KIO::Integration::CookieJar. - * - * By default the cookiejar's window id is set to false. Make sure you call - * this function and set the window id to its proper value when create an - * instance of this object. Otherwise, the KDE cookiejar will not be able - * to properly manage session based cookies. - * - * @see KIO::Integration::CookieJar::setWindowId. - * @since 4.4 - * @deprecated Use setWindow - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setCookieJarWindowId(WId id); -#endif - /** * Sets the window associated with this network access manager. * @@ -138,22 +118,6 @@ public: */ void setWindow(QWidget* widget); - /** - * Returns the cookiejar's window id. - * - * This is a convenience function that returns the window id associated - * with the cookiejar. Note that this function will return a 0 if the - * cookiejar is not of type KIO::Integration::CookieJar or a window id - * has not yet been set. - * - * @see KIO::Integration::CookieJar::windowId. - * @since 4.4 - * @deprecated Use KIO::Integration::CookieJar::windowId - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED WId cookieJarWindowid() const; -#endif - /** * Returns the window associated with this network access manager. * diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp index c963d427..be26c23e 100644 --- a/kio/kio/global.cpp +++ b/kio/kio/global.cpp @@ -92,30 +92,6 @@ KIO_EXPORT QString KIO::convertSeconds( unsigned int seconds ) return timeStr; } -#ifndef KDE_NO_DEPRECATED -KIO_EXPORT QTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) -{ - QTime remainingTime; - - if ( speed != 0 ) { - KIO::filesize_t secs; - if ( totalSize == 0 ) { - secs = 0; - } else { - secs = ( totalSize - processedSize ) / speed; - } - if (secs >= (24*60*60)) // Limit to 23:59:59 - secs = (24*60*60)-1; - int hr = secs / ( 60 * 60 ); - int mn = ( secs - hr * 60 * 60 ) / 60; - int sc = ( secs - hr * 60 * 60 - mn * 60 ); - - remainingTime.setHMS( hr, mn, sc ); - } - - return remainingTime; -} -#endif KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize) { diff --git a/kio/kio/global.h b/kio/kio/global.h index 7613722d..06b10218 100644 --- a/kio/kio/global.h +++ b/kio/kio/global.h @@ -109,9 +109,6 @@ namespace KIO * @param speed speed in bytes per second * @return calculated remaining time */ -#ifndef KDE_NO_DEPRECATED - KIO_EXPORT_DEPRECATED QTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ); -#endif /** * Helper for showing information about a set of files and directories diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 456bf18b..2f0ef74b 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -212,20 +212,6 @@ void JobPrivate::slotSpeed( KJob*, unsigned long speed ) //Job::errorString is implemented in global.cpp -#ifndef KDE_NO_DEPRECATED -void Job::showErrorDialog( QWidget *parent ) -{ - if ( ui() ) - { - ui()->setWindow( parent ); - ui()->showErrorMessage(); - } - else - { - kError() << errorString(); - } -} -#endif bool Job::isInteractive() const { @@ -819,12 +805,6 @@ StatJob::~StatJob() { } -#ifndef KDE_NO_DEPRECATED -void StatJob::setSide( bool source ) -{ - d_func()->m_bSource = source; -} -#endif void StatJob::setSide( StatSide side ) { @@ -937,17 +917,6 @@ StatJob *KIO::mostLocalUrl(const KUrl& url, JobFlags flags) return job; } -#ifndef KDE_NO_DEPRECATED -StatJob *KIO::stat(const KUrl& url, bool sideIsSource, short int details, JobFlags flags ) -{ - //kDebug(7007) << "stat" << url; - KIO_ARGS << url; - StatJob * job = StatJobPrivate::newJob(url, CMD_STAT, packedArgs, flags); - job->setSide( sideIsSource ? StatJob::SourceSide : StatJob::DestinationSide ); - job->setDetails( details ); - return job; -} -#endif StatJob *KIO::stat(const KUrl& url, KIO::StatJob::StatSide side, short int details, JobFlags flags ) { @@ -1135,23 +1104,7 @@ void TransferJob::sendAsyncData(const QByteArray &dataForSlave) d->m_extraFlags &= ~JobPrivate::EF_TransferJobNeedData; } -#ifndef KDE_NO_DEPRECATED -void TransferJob::setReportDataSent(bool enabled) -{ - Q_D(TransferJob); - if (enabled) - d->m_extraFlags |= JobPrivate::EF_TransferJobDataSent; - else - d->m_extraFlags &= ~JobPrivate::EF_TransferJobDataSent; -} -#endif -#ifndef KDE_NO_DEPRECATED -bool TransferJob::reportDataSent() const -{ - return (d_func()->m_extraFlags & JobPrivate::EF_TransferJobDataSent); -} -#endif QString TransferJob::mimetype() const { diff --git a/kio/kio/job.h b/kio/kio/job.h index 7328ea89..c22d39ae 100644 --- a/kio/kio/job.h +++ b/kio/kio/job.h @@ -198,38 +198,6 @@ namespace KIO { */ KIO_EXPORT StatJob * stat( const KUrl& url, KIO::StatJob::StatSide side, short int details, JobFlags flags = DefaultFlags ); - /** - * Find all details for one file or directory. - * This version of the call includes two additional booleans, @p sideIsSource and @p details. - * - * @param url the URL of the file - * @param sideIsSource is true when stating a source file (we will do a get on it if - * the stat works) and false when stating a destination file (target of a copy). - * The reason for this parameter is that in some cases the kioslave might not - * be able to determine a file's existence (e.g. HTTP doesn't allow it, FTP - * has issues with case-sensitivity on some systems). - * When the slave can't reliably determine the existence of a file, it will: - * @li be optimistic if sideIsSource=true, i.e. it will assume the file exists, - * and if it doesn't this will appear when actually trying to download it - * @li be pessimistic if sideIsSource=false, i.e. it will assume the file - * doesn't exist, to prevent showing "about to overwrite" errors to the user. - * If you simply want to check for existence without downloading/uploading afterwards, - * then you should use sideIsSource=false. - * - * @param details selects the level of details we want. - * By default this is 2 (all details wanted, including modification time, size, etc.), - * setDetails(1) is used when deleting: we don't need all the information if it takes - * too much time, no need to follow symlinks etc. - * setDetails(0) is used for very simple probing: we'll only get the answer - * "it's a file or a directory, or it doesn't exist". This is used by KRun. - * @param flags Can be HideProgressInfo here - * @return the job handling the operation. - */ -#ifndef KDE_NO_DEPRECATED - KIO_EXPORT_DEPRECATED StatJob * stat( const KUrl& url, bool sideIsSource, - short int details, JobFlags flags = DefaultFlags ); -#endif - /** * Get (a.k.a. read). * This is the job to use in order to "download" a file into memory. diff --git a/kio/kio/jobclasses.h b/kio/kio/jobclasses.h index d771cfe1..b0ee44a0 100644 --- a/kio/kio/jobclasses.h +++ b/kio/kio/jobclasses.h @@ -174,9 +174,6 @@ namespace KIO { * @deprecated you should use job->ui()->setWindow(parent) * and job->ui()->showErrorMessage() instead */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void showErrorDialog( QWidget *parent = 0 ); -#endif /** * Returns whether the user should be asked about things when the job @@ -465,9 +462,6 @@ namespace KIO { * (e.g. with FTP). * @param source true for "source" mode, false for "dest" mode */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setSide( bool source ); -#endif /** * Selects the level of @p details we want. @@ -596,9 +590,6 @@ namespace KIO { * @deprecated not needed, this is false for KIO::get and true for KIO::put, * automatically since KDE-4.2.1 */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setReportDataSent(bool enabled); -#endif /** * Returns whether the job reports the amount of data that has been @@ -607,9 +598,6 @@ namespace KIO { * @deprecated not needed, this is false for KIO::get and true for KIO::put, * automatically since KDE-4.2.1 (and not useful as public API) */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool reportDataSent() const; -#endif /** * Call this in the slot connected to result, diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp index 00e58c19..ba596448 100644 --- a/kio/kio/kdatatool.cpp +++ b/kio/kio/kdatatool.cpp @@ -109,37 +109,7 @@ bool KDataToolInfo::isReadOnly() const return d->service->property( "ReadOnly" ).toBool(); } -#ifndef KDE_NO_DEPRECATED -QPixmap KDataToolInfo::icon() const -{ - if ( !d->service ) - return QPixmap(); - QPixmap pix; - const QStringList lst = KGlobal::dirs()->resourceDirs("icon"); - QStringList::ConstIterator it = lst.begin(); - while (!pix.load( *it + '/' + d->service->icon() ) && it != lst.end() ) - it++; - - return pix; -} -#endif - -#ifndef KDE_NO_DEPRECATED -QPixmap KDataToolInfo::miniIcon() const -{ - if ( !d->service ) - return QPixmap(); - - QPixmap pix; - const QStringList lst = KGlobal::dirs()->resourceDirs("mini"); - QStringList::ConstIterator it = lst.begin(); - while (!pix.load( *it + '/' + d->service->icon() ) && it != lst.end() ) - it++; - - return pix; -} -#endif QString KDataToolInfo::iconName() const { diff --git a/kio/kio/kdatatool.h b/kio/kio/kdatatool.h index f4518acf..179fe472 100644 --- a/kio/kio/kdatatool.h +++ b/kio/kio/kdatatool.h @@ -98,27 +98,12 @@ public: */ bool isReadOnly() const; - /** - * Returns the icon of this data tool. - * @return a large pixmap for the DataTool. - * @deprecated, use iconName() - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QPixmap icon() const; -#endif - /** - * Returns the mini icon of this data tool. - * @return a mini pixmap for the DataTool. - * @deprecated, use iconName() - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QPixmap miniIcon() const; -#endif /** * Returns the icon name for this DataTool. * @return the name of the icon for the DataTool */ QString iconName() const; + /** * Returns a list of strings that you can put in a QPopupMenu item, for example to * offer the DataTools services to the user. The returned value diff --git a/kio/kio/kdirmodel.cpp b/kio/kio/kdirmodel.cpp index 8f42498c..abef9a6a 100644 --- a/kio/kio/kdirmodel.cpp +++ b/kio/kio/kdirmodel.cpp @@ -927,14 +927,6 @@ KFileItem KDirModel::itemForIndex( const QModelIndex& index ) const } } -#ifndef KDE_NO_DEPRECATED -QModelIndex KDirModel::indexForItem( const KFileItem* item ) const -{ - // Note that we can only use the URL here, not the pointer. - // KFileItems can be copied. - return indexForUrl(item->url()); // O(n) -} -#endif QModelIndex KDirModel::indexForItem( const KFileItem& item ) const { diff --git a/kio/kio/kdirmodel.h b/kio/kio/kdirmodel.h index 6691e03e..e9f908ad 100644 --- a/kio/kio/kdirmodel.h +++ b/kio/kio/kdirmodel.h @@ -72,14 +72,6 @@ public: */ KFileItem itemForIndex( const QModelIndex& index ) const; - /** - * Return the index for a given kfileitem. This can be slow. - * @deprecated use the method that takes a KFileItem by value - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QModelIndex indexForItem( const KFileItem* ) const; -#endif - /** * Return the index for a given kfileitem. This can be slow. */ diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index a4a4c9c2..54d795af 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -195,9 +195,6 @@ public: // For special case like link to dirs over FTP QString m_guessedMimeType; mutable QString m_access; -#ifndef KDE_NO_DEPRECATED - QMap m_extra; // DEPRECATED -#endif mutable KFileMetaInfo m_metaInfo; enum { NumFlags = KFileItem::CreationTime + 1 }; @@ -658,23 +655,6 @@ KDateTime KFileItem::time( FileTimes which ) const return d->time(which); } -#ifndef KDE_NO_DEPRECATED -time_t KFileItem::time( unsigned int which ) const -{ - if (!d) - return 0; - - switch (which) { - case KIO::UDSEntry::UDS_ACCESS_TIME: - return d->time(AccessTime).toTime_t(); - case KIO::UDSEntry::UDS_CREATION_TIME: - return d->time(CreationTime).toTime_t(); - case KIO::UDSEntry::UDS_MODIFICATION_TIME: - default: - return d->time(ModificationTime).toTime_t(); - } -} -#endif QString KFileItem::user() const { @@ -1149,28 +1129,6 @@ bool KFileItem::isFile() const return !isDir(); } -#ifndef KDE_NO_DEPRECATED -bool KFileItem::acceptsDrops() const -{ - // A directory ? - if ( S_ISDIR( mode() ) ) { - return isWritable(); - } - - // But only local .desktop files and executables - if ( !d->m_bIsLocalUrl ) - return false; - - if ( mimetype() == "application/x-desktop") - return true; - - // Executable, shell script ... ? - if ( QFileInfo(d->m_url.toLocalFile()).isExecutable() ) - return true; - - return false; -} -#endif QString KFileItem::getStatusBarInfo() const { @@ -1203,84 +1161,6 @@ QString KFileItem::getStatusBarInfo() const return text; } -#ifndef KDE_NO_DEPRECATED -QString KFileItem::getToolTipText(int maxcount) const -{ - if (!d) - return QString(); - - // we can return QString() if no tool tip should be shown - QString tip; - KFileMetaInfo info = metaInfo(); - - // the font tags are a workaround for the fact that the tool tip gets - // screwed if the color scheme uses white as default text color - const QString colorName = QApplication::palette().color(QPalette::ToolTipText).name(); - const QString start = ""; - const QString mid = " "; - const char* end = ""; - - tip = ""; - - tip += start + i18n("Name:") + mid + text() + end; - tip += start + i18n("Type:") + mid; - - QString type = Qt::escape(mimeComment()); - if ( d->m_bLink ) { - tip += i18n("Link to %1 (%2)", linkDest(), type) + end; - } else - tip += type + end; - - if ( !S_ISDIR ( d->m_fileMode ) ) - tip += start + i18n("Size:") + mid + - QString("%1").arg(KIO::convertSize(size())) + - end; - - tip += start + i18n("Modified:") + mid + - timeString( KFileItem::ModificationTime ) + end - +start + i18n("Owner:") + mid + user() + " - " + group() + end + - start + i18n("Permissions:") + mid + - permissionsString() + end - ; - - if (info.isValid()) - { - const QStringList keys = info.preferredKeys(); - - // now the rest - QStringList::ConstIterator it = keys.begin(); - for (int count = 0; countm_entry = _entry; - d->m_url = _url; - d->m_strName.clear(); - d->m_strText.clear(); - d->m_iconName.clear(); - d->m_strLowerCaseName.clear(); - d->m_pMimeType = 0; - d->m_fileMode = KFileItem::Unknown; - d->m_permissions = KFileItem::Unknown; - d->m_bMarked = false; - d->m_bLink = false; - d->m_bIsLocalUrl = _url.isLocalFile(); - d->m_bMimeTypeKnown = false; - d->m_hidden = KFileItemPrivate::Auto; - d->m_guessedMimeType.clear(); - d->m_metaInfo = KFileMetaInfo(); - d->m_delayedMimeTypes = _delayedMimeTypes; - d->m_useIconNameCache = false; - - d->readUDSEntry( _urlIsDirectory ); - d->init(); -} -#endif KFileItem::operator QVariant() const { return qVariantFromValue(*this); } -#ifndef KDE_NO_DEPRECATED -void KFileItem::setExtraData( const void *key, void *value ) -{ - if (!d) - return; - if ( !key ) - return; - d->m_extra.insert( key, value ); // replaces the value of key if already there -} -#endif - -#ifndef KDE_NO_DEPRECATED -const void * KFileItem::extraData( const void *key ) const -{ - if (!d) - return 0; - - return d->m_extra.value( key, 0 ); -} -#endif - -#ifndef KDE_NO_DEPRECATED -void KFileItem::removeExtraData( const void *key ) -{ - if (!d) - return; - - d->m_extra.remove( key ); -} -#endif QString KFileItem::permissionsString() const { @@ -1408,23 +1228,6 @@ QString KFileItem::timeString( FileTimes which ) const return KGlobal::locale()->formatDateTime( d->time(which) ); } -#ifndef KDE_NO_DEPRECATED -QString KFileItem::timeString( unsigned int which ) const -{ - if (!d) - return QString(); - - switch (which) { - case KIO::UDSEntry::UDS_ACCESS_TIME: - return timeString(AccessTime); - case KIO::UDSEntry::UDS_CREATION_TIME: - return timeString(CreationTime); - case KIO::UDSEntry::UDS_MODIFICATION_TIME: - default: - return timeString(ModificationTime); - } -} -#endif void KFileItem::setMetaInfo( const KFileMetaInfo & info ) const { @@ -1448,12 +1251,6 @@ KFileMetaInfo KFileItem::metaInfo(bool autoget, int what) const return d->m_metaInfo; } -#ifndef KDE_NO_DEPRECATED -void KFileItem::assign( const KFileItem & item ) -{ - *this = item; -} -#endif KUrl KFileItem::mostLocalUrl(bool &local) const { diff --git a/kio/kio/kfileitem.h b/kio/kio/kfileitem.h index b5226bb0..66010064 100644 --- a/kio/kio/kfileitem.h +++ b/kio/kio/kfileitem.h @@ -298,9 +298,6 @@ public: * @see timeString() */ KDateTime time( FileTimes which ) const; -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED time_t time( unsigned int which ) const; -#endif /** * Requests the modification, access or creation time as a string, depending @@ -310,9 +307,6 @@ public: * @see time */ QString timeString( FileTimes which = ModificationTime ) const; -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString timeString( unsigned int which) const; -#endif /** * Returns true if the file is a local file. @@ -420,34 +414,6 @@ public: */ QString getStatusBarInfo() const; - /** - * Returns the string to be displayed in the tool tip when the mouse - * is over this item. This may load a plugin to determine additional - * information specific to the mimetype of the file. - * - * @param maxcount the maximum number of entries shown - * @return the tool tip string - * - * @deprecated File Managers implement more complete tooltips. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QString getToolTipText(int maxcount = 6) const; -#endif - - /** - * Returns true if files can be dropped over this item. - * Contrary to popular belief, not only dirs will return true :) - * Executables, .desktop files, will do so as well. - * @return true if you can drop files over the item - * - * @deprecated This logic is application-dependent, the behavior described above - * mostly makes sense for file managers only. - * KDirModel has setDropsAllowed for similar (but configurable) logic. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool acceptsDrops() const; -#endif - /** * Let's "KRun" this file ! * (e.g. when file is clicked or double-clicked or return is pressed) @@ -511,68 +477,6 @@ public: */ operator QVariant() const; - /** - * This allows to associate some "extra" data to a KFileItem. As one - * KFileItem can be used by several objects (often views) which all need - * to add some data, you have to use a key to reference your extra data - * within the KFileItem. - * - * That way a KFileItem can hold and provide access to all those views - * separately. - * - * I.e. a KFileIconView that associates a KFileIconViewItem (an item suitable - * for use with QIconView) does - * - * \code - * kfileItem->setExtraData( this, iconViewItem ); - * \endcode - * - * and can later access the iconViewItem by doing - * - * \code - * KFileIconViewItem *iconViewItem = static_cast( kfileItem->extraData( this )); - * \endcode - * - * This is usually more efficient then having every view associate data to - * items by using a separate QDict or QMap. - * - * Note: you have to remove and destroy the data you associated yourself - * when you don't need it anymore! - * - * @param key the key of the extra data - * @param value the value of the extra data - * @see extraData - * @see removeExtraData - * - * @deprecated use model/view (KDirModel) and you won't need this anymore - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setExtraData( const void *key, void *value ); -#endif - - /** - * Retrieves the extra data with the given @p key. - * @param key the key of the extra data - * @return the extra data associated to an item with @p key via - * setExtraData. 0L if nothing was associated with @p key. - * @see extraData - * - * @deprecated use model/view (KDirModel) and you won't need this anymore - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED const void * extraData( const void *key ) const; -#endif - - /** - * Removes the extra data associated with an item via @p key. - * @param key the key of the extra data to remove - * - * @deprecated use model/view (KDirModel) and you won't need this anymore - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void removeExtraData( const void *key ); -#endif - /** * Sets the metainfo of this item to @p info. * @@ -592,38 +496,6 @@ public: KFileMetaInfo metaInfo(bool autoget = true, int what = KFileMetaInfo::ContentInfo | KFileMetaInfo::TechnicalInfo) const; - /** - * @deprecated simply use '=' - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void assign( const KFileItem & item ); -#endif - - /** - * Reinitialize KFileItem with a new UDSEntry. - * - * Note: extra-data set with setExtraData() is not changed or deleted, so - * be careful what you do! - * - * KDirListerCache uses it to save new/delete calls by updating existing - * items that are otherwise not needed anymore. - * - * @param entry the UDSEntry to assign to this KFileItem - * @param url the file url - * @param delayedMimeTypes specifies if the mimetype of the given - * URL should be determined immediately or on demand - * @param urlIsDirectory specifies if the url is just the directory of the - * fileitem and the filename from the UDSEntry should be used. - * - * @deprecated why not just create another KFileItem and use operator=, - * now that it's a value class? - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setUDSEntry( const KIO::UDSEntry& entry, const KUrl& url, - bool delayedMimeTypes = false, - bool urlIsDirectory = false ); -#endif - /** * Tries to give a local URL for this file item if possible. * The given boolean indicates if the returned url is local or not. diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index 275c9185..769dd61f 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -382,19 +382,7 @@ QStringList KFileMetaInfo::supportedKeys() const return QStringList(); } -#ifndef KDE_NO_DEPRECATED -KFileMetaInfoGroupList KFileMetaInfo::preferredGroups() const -{ - return KFileMetaInfoGroupList(); -} -#endif -#ifndef KDE_NO_DEPRECATED -KFileMetaInfoGroupList KFileMetaInfo::supportedGroups() const -{ - return KFileMetaInfoGroupList(); -} -#endif #else //KIO_NO_STRIGI class KFileMetaInfoPrivate : public QSharedData diff --git a/kio/kio/kfilemetainfo.h b/kio/kio/kfilemetainfo.h index 6920ffe6..f51c952f 100644 --- a/kio/kio/kfilemetainfo.h +++ b/kio/kio/kfilemetainfo.h @@ -66,23 +66,18 @@ public: Fastest = 0x1, /**< do the fastest possible read and omit all items that might need a significantly longer time than the others */ -// Deprecated -// DontCare = 0x2, ///< let the plugin decide what to read. - - TechnicalInfo = 0x4, /**< extract technical details about the file, like + TechnicalInfo = 0x2, /**< extract technical details about the file, like e.g. play time, resolution or a compressioni type */ - ContentInfo = 0x8, /**< read information about the content of the file + ContentInfo = 0x4, /**< read information about the content of the file like comments or id3 tags */ - ExternalSources = 0x10, /**>(QDataStream& s, KFileMetaInfo& ) ; KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo&); - /** - * Deprecated - **/ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED KFileMetaInfoGroupList preferredGroups() const; -#endif - /** - * Deprecated - **/ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED KFileMetaInfoGroupList supportedGroups() const; -#endif KFileMetaInfoGroupList groups() const; QStringList keys() const; const KUrl& url() const; diff --git a/kio/kio/kfilemetainfoitem.cpp b/kio/kio/kfilemetainfoitem.cpp index a5943440..bd9ea4e7 100644 --- a/kio/kio/kfilemetainfoitem.cpp +++ b/kio/kio/kfilemetainfoitem.cpp @@ -30,9 +30,6 @@ KFileMetaInfoItem::KFileMetaInfoItem(const KFileMetaInfoItem& item) : d(item.d) KFileMetaInfoItem::KFileMetaInfoItem(const QString& pp, const QVariant& v, KFileWritePlugin* w, bool e) : d(new KFileMetaInfoItemPrivate()) { -#ifndef KDE_NO_DEPRECATED - d->pp = pp; -#endif d->value = v; d->writer = w; d->embedded = e; @@ -47,11 +44,7 @@ const KFileMetaInfoItem& KFileMetaInfoItem::operator=(const KFileMetaInfoItem& i } const QString& KFileMetaInfoItem::name() const { -#ifndef KDE_NO_DEPRECATED - return d->pp.name(); -#else return QString::null; -#endif } const QVariant& KFileMetaInfoItem::value() const { @@ -91,12 +84,6 @@ bool KFileMetaInfoItem::isSkipped() const { // ########## TODO implement (vandenoever) return false; } -#ifndef KDE_NO_DEPRECATED -const PredicateProperties& -KFileMetaInfoItem::properties() const { - return d->pp; -} -#endif bool KFileMetaInfoItem::isEditable() const { return d->writer != 0; diff --git a/kio/kio/kfilemetainfoitem_p.h b/kio/kio/kfilemetainfoitem_p.h index c811a60b..7c608499 100644 --- a/kio/kio/kfilemetainfoitem_p.h +++ b/kio/kio/kfilemetainfoitem_p.h @@ -24,10 +24,6 @@ #include "kurl.h" #include -#ifndef KDE_NO_DEPRECATED -#include -#else -#endif #include #include @@ -37,10 +33,6 @@ class KFileWritePlugin; class KFileMetaInfoItemPrivate : public QSharedData { public: KFileMetaInfoItemPrivate() : writer(0) {} -#ifndef KDE_NO_DEPRECATED - PredicateProperties pp; -#else -#endif KUrl propertyUri; QVariant value; KFileWritePlugin* writer; diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp index 06d2403d..cd619829 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -201,17 +201,6 @@ bool KRun::displayOpenWithDialog(const KUrl::List& lst, QWidget* window, bool te return false; } -#ifndef KDE_NO_DEPRECATED -void KRun::shellQuote(QString &_str) -{ - // Credits to Walter, says Bernd G. :) - if (_str.isEmpty()) { // Don't create an explicit empty parameter - return; - } - QChar q('\''); - _str.replace(q, "'\\''").prepend(q).append(q); -} -#endif class KRunMX1 : public KMacroExpanderBase @@ -1636,52 +1625,16 @@ KIO::Job* KRun::job() return d->m_job; } -#ifndef KDE_NO_DEPRECATED -QTimer& KRun::timer() -{ - return d->m_timer; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KRun::setDoScanFile(bool scanFile) -{ - d->m_bScanFile = scanFile; -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KRun::doScanFile() const -{ - return d->m_bScanFile; -} -#endif -#ifndef KDE_NO_DEPRECATED -void KRun::setIsDirecory(bool isDirectory) -{ - d->m_bIsDirectory = isDirectory; -} -#endif bool KRun::isDirectory() const { return d->m_bIsDirectory; } -#ifndef KDE_NO_DEPRECATED -void KRun::setInitializeNextAction(bool initialize) -{ - d->m_bInit = initialize; -} -#endif -#ifndef KDE_NO_DEPRECATED -bool KRun::initializeNextAction() const -{ - return d->m_bInit; -} -#endif void KRun::setIsLocalFile(bool isLocalFile) { diff --git a/kio/kio/krun.h b/kio/kio/krun.h index d8c4b5ea..037728e7 100644 --- a/kio/kio/krun.h +++ b/kio/kio/krun.h @@ -310,20 +310,6 @@ public: bool tempFiles = false, const QString& suggestedFileName = QString(), const QByteArray& asn = QByteArray()); - /** - * Quotes a string for the shell. - * An empty string will @em not be quoted. - * - * @deprecated Use KShell::quoteArg() instead. @em Note that this function - * behaves differently for empty arguments and returns the result - * differently. - * - * @param str the string to quote. The quoted string will be written here - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED void shellQuote(QString &str); -#endif - /** * Processes a Exec= line as found in .desktop files. * @param _service the service to extract information from. @@ -493,58 +479,11 @@ protected: */ KIO::Job* job(); - /** - * Returns the timer object. - * @deprecated setFinished(true) now takes care of the timer().start(0), - * so this can be removed. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QTimer& timer(); -#endif - - /** - * Indicate that the next action is to scan the file. - * @deprecated not useful in public API - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setDoScanFile(bool scanFile); -#endif - - /** - * Returns whether the file shall be scanned. - * @deprecated not useful in public API - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool doScanFile() const; -#endif - - /** - * Sets whether it is a directory. - * @deprecated typo in the name, and not useful as a public method - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setIsDirecory(bool isDirectory); -#endif - /** * Returns whether it is a directory. */ bool isDirectory() const; - /** - * @deprecated not useful in public API - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setInitializeNextAction(bool initialize); -#endif - - /** - * @deprecated not useful in public API - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool initializeNextAction() const; -#endif - /** * Sets whether it is a local file. */ diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp index b06707ae..92d35470 100644 --- a/kio/kio/kurifilter.cpp +++ b/kio/kio/kurifilter.cpp @@ -537,24 +537,6 @@ void KUriFilterPlugin::setSearchProvider( KUriFilterData &data, const QString& p data.d->searchTermSeparator = separator; } -#ifndef KDE_NO_DEPRECATED -void KUriFilterPlugin::setPreferredSearchProviders(KUriFilterData &data, const ProviderInfoList &providers) const -{ - QHashIterator > it (providers); - while (it.hasNext()) - { - it.next(); - KUriFilterSearchProvider* searchProvider = data.d->searchProviderMap[it.key()]; - searchProvider->setName(it.key()); - searchProvider->setIconName(it.value().second); - QStringList keys; - const QStringList queries = it.value().first.split(QLatin1Char(',')); - Q_FOREACH(const QString& query, queries) - keys << query.left(query.indexOf(data.d->searchTermSeparator)); - searchProvider->setKeys(keys); - } -} -#endif void KUriFilterPlugin::setSearchProviders(KUriFilterData &data, const QList& providers) const { @@ -664,12 +646,6 @@ QString KUriFilter::filteredUri( const QString &uri, const QStringList& filters return data.uri().url(); } -#ifndef KDE_NO_DEPRECATED -bool KUriFilter::filterSearchUri(KUriFilterData &data) -{ - return filterSearchUri(data, (NormalTextFilter | WebShortcutFilter)); -} -#endif bool KUriFilter::filterSearchUri(KUriFilterData &data, SearchFilterTypes types) { diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h index 3b1c1bb4..d7fb005d 100644 --- a/kio/kio/kurifilter.h +++ b/kio/kio/kurifilter.h @@ -644,17 +644,6 @@ class KIO_EXPORT KUriFilterPlugin : public QObject Q_OBJECT public: - /** - * List for holding the following search provider information: - * ([search provider name], [search query, search query icon name]) - * - * @since 4.5 - * @deprecated Use @ref KUriFilterSearchProvider instead. See @ref setSearchProviders; - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED typedef QHash > ProviderInfoList; -#endif - /** * Constructs a filter plugin with a given name * @@ -719,16 +708,6 @@ protected: void setSearchProvider( KUriFilterData& data, const QString& provider, const QString& term, const QChar& separator) const; - /** - * Sets the name of the preferred search providers in @p data. - * - * @since 4.5 - * @deprecated Use @ref setSearchProviders instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setPreferredSearchProviders(KUriFilterData& data, const ProviderInfoList& providers) const; -#endif - /** * Sets the information about the search @p providers in @p data. * @@ -955,16 +934,6 @@ public: */ QString filteredUri( const QString &uri, const QStringList& filters = QStringList() ); - /** - * See @ref filterSearchUri(KUriFilterData&, SearchFilterTypes) - * - * @since 4.5 - * @deprecated Use filterSearchUri(KUriFilterData&, SearchFilterTypes) instead. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool filterSearchUri(KUriFilterData &data); -#endif - /** * Filter @p data using the criteria specified by @p types. * diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index e051c139..9801e1cc 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -148,12 +148,6 @@ bool NetAccess::file_copy( const KUrl & src, const KUrl & target, QWidget* windo window, false /*copy*/ ); } -#ifndef KDE_NO_DEPRECATED -bool NetAccess::copy( const KUrl& src, const KUrl& target, QWidget* window ) -{ - return file_copy( src, target, window ); -} -#endif // bool NetAccess::file_copy( const KUrl& src, const KUrl& target, int permissions, // bool overwrite, bool resume, QWidget* window ) @@ -185,34 +179,8 @@ bool NetAccess::dircopy( const KUrl::List & srcList, const KUrl & target, QWidge return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ ); } -#ifndef KDE_NO_DEPRECATED -bool NetAccess::move( const KUrl& src, const KUrl& target, QWidget* window ) -{ - KUrl::List srcList; - srcList.append( src ); - NetAccess kioNet; - return kioNet.dircopyInternal( srcList, target, window, true /*move*/ ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool NetAccess::move( const KUrl::List& srcList, const KUrl& target, QWidget* window ) -{ - NetAccess kioNet; - return kioNet.dircopyInternal( srcList, target, window, true /*move*/ ); -} -#endif -#ifndef KDE_NO_DEPRECATED -bool NetAccess::exists( const KUrl & url, bool source, QWidget* window ) -{ - if ( url.isLocalFile() ) - return QFile::exists( url.toLocalFile() ); - NetAccess kioNet; - return kioNet.statInternal( url, 0 /*no details*/, - source ? SourceSide : DestinationSide, window ); -} -#endif bool NetAccess::exists( const KUrl & url, StatSide side, QWidget* window ) { diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h index 97448808..6c944e28 100644 --- a/kio/kio/netaccess.h +++ b/kio/kio/netaccess.h @@ -190,11 +190,6 @@ public: * @return true if successful, false for failure */ static bool file_copy( const KUrl& src, const KUrl& target, QWidget* window = 0 ); - /// @deprecated, use file_copy instead -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool copy( const KUrl& src, const KUrl& target, - QWidget* window = 0 ); -#endif /** * Alternative method for copying over the network. @@ -223,45 +218,6 @@ public: */ static bool dircopy( const KUrl::List& src, const KUrl& target, QWidget* window = 0L ); // TODO deprecate in favor of KIO::copy + synchronousRun (or job->exec()) - /** - * Full-fledged equivalent of KIO::move. - * Moves or renames one file or directory. - * @deprecated use KIO::move and then KIO::NetAccess::synchronousRun (or job->exec()) - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool move( const KUrl& src, const KUrl& target, QWidget* window = 0L ); -#endif - - /** - * Full-fledged equivalent of KIO::move. - * Moves or renames a list of files or directories. - * @deprecated use KIO::move and then KIO::NetAccess::synchronousRun (or job->exec()) - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool move( const KUrl::List& src, const KUrl& target, QWidget* window = 0L ); -#endif - - /** - * Tests whether a URL exists. - * - * @param url the URL we are testing - * @param source if true, we want to read from that URL. - * If false, we want to write to it. - * IMPORTANT: see documentation for KIO::stat for more details about this. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return true if the URL exists and we can do the operation specified by - * @p source, false otherwise - * - * @deprecated use the StatSide enum instead of the bool source - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED bool exists(const KUrl& url, bool source, QWidget* window); -#endif - /** * Tests whether a URL exists. * diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index 16613222..46c2dc51 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -130,37 +130,6 @@ public: Q_DECLARE_PUBLIC(PreviewJob) }; -#ifndef KDE_NO_DEPRECATED -PreviewJob::PreviewJob( const KFileItemList &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const QStringList *enabledPlugins ) - : KIO::Job(*new PreviewJobPrivate) -{ - Q_D(PreviewJob); - d->tOrig = 0; - d->shmid = -1; - d->shmaddr = 0; - d->initialItems = items; - d->enabledPlugins = enabledPlugins ? *enabledPlugins : availablePlugins(); - d->width = width; - d->height = height ? height : width; - d->cacheWidth = d->width; - d->cacheHeight = d->height; - d->iconSize = iconSize; - d->iconAlpha = iconAlpha; - d->bScale = scale; - d->bSave = save && scale; - d->succeeded = false; - d->thumbRoot = QDir::homePath() + QLatin1String("/.thumbnails/"); - d->ignoreMaximumSize = false; - d->sequenceIndex = 0; - d->maximumLocalSize = 0; - d->maximumRemoteSize = 0; - - // Return to event loop first, determineNextFile() might delete this; - QTimer::singleShot(0, this, SLOT(startPreview())); -} -#endif PreviewJob::PreviewJob(const KFileItemList &items, const QSize &size, @@ -751,40 +720,11 @@ QStringList PreviewJob::supportedMimeTypes() return result; } -#ifndef KDE_NO_DEPRECATED -PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const QStringList *enabledPlugins ) -{ - return new PreviewJob(items, width, height, iconSize, iconAlpha, - scale, save, enabledPlugins); -} - -PreviewJob *KIO::filePreview( const KUrl::List &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const QStringList *enabledPlugins ) -{ - KFileItemList fileItems; - for (KUrl::List::ConstIterator it = items.begin(); it != items.end(); ++it) { - Q_ASSERT( (*it).isValid() ); // please call us with valid urls only - fileItems.append(KFileItem(KFileItem::Unknown, KFileItem::Unknown, *it, true)); - } - return new PreviewJob(fileItems, width, height, iconSize, iconAlpha, - scale, save, enabledPlugins); -} -#endif PreviewJob *KIO::filePreview(const KFileItemList &items, const QSize &size, const QStringList *enabledPlugins) { return new PreviewJob(items, size, enabledPlugins); } -#ifndef KDE_NO_DEPRECATED -KIO::filesize_t PreviewJob::maximumFileSize() -{ - KConfigGroup cg( KGlobal::config(), "PreviewSettings" ); - return cg.readEntry( "MaximumSize", 5*1024*1024LL /* 5MB */ ); -} -#endif #include "moc_previewjob.cpp" diff --git a/kio/kio/previewjob.h b/kio/kio/previewjob.h index 0b2c5eef..4555508c 100644 --- a/kio/kio/previewjob.h +++ b/kio/kio/previewjob.h @@ -62,31 +62,6 @@ namespace KIO { ScaledAndCached }; -#ifndef KDE_NO_DEPRECATED - /** - * Creates a new PreviewJob. - * @param items a list of files to create previews for - * @param width the desired width - * @param height the desired height, 0 to use the @p width - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins If non-zero, this points to a list containing - * the names of the plugins that may be used. If enabledPlugins is zero - * all available plugins are used. - * - * @deprecated Use PreviewJob(KFileItemList, QSize, QStringList) in combination - * with the setter-methods instead. Note that the semantics of - * \p enabledPlugins has been slightly changed. - */ - KDE_DEPRECATED PreviewJob(const KFileItemList& items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const QStringList *enabledPlugins); -#endif /** * @param items List of files to create previews for. @@ -197,18 +172,6 @@ namespace KIO { */ static QStringList supportedMimeTypes(); - /** - * Returns the default "maximum file size", in bytes, used by PreviewJob. - * This is useful for applications providing a GUI for letting the user change the size. - * @since 4.1 - * @deprecated PreviewJob uses different maximum file sizes dependent on the URL since 4.5. - * The returned file size is only valid for local URLs. - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static KIO::filesize_t maximumFileSize(); -#endif - - Q_SIGNALS: /** * Emitted when a thumbnail picture for @p item has been successfully @@ -234,57 +197,6 @@ namespace KIO { Q_DECLARE_PRIVATE(PreviewJob) }; -#ifndef KDE_NO_DEPRECATED - /** - * Creates a PreviewJob to generate or retrieve a preview image - * for the given URL. - * - * @param items files to get previews for - * @param width the maximum width to use - * @param height the maximum height to use, if this is 0, the same - * value as width is used. - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins if non-zero, this points to a list containing - * the names of the plugins that may be used. - * @return the new PreviewJob - * @see PreviewJob::availablePlugins() - * @deprecated Use KIO::filePreview(KFileItemList, QSize, QStringList) in combination - * with the setter-methods instead. Note that the semantics of - * \p enabledPlugins has been slightly changed. - */ - KIO_EXPORT_DEPRECATED PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 ); // KDE5: use enums instead of bool scale + bool save - - /** - * Creates a PreviewJob to generate or retrieve a preview image - * for the given URL. - * - * @param items files to get previews for - * @param width the maximum width to use - * @param height the maximum height to use, if this is 0, the same - * value as width is used. - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins if non-zero, this points to a list containing - * the names of the plugins that may be used. - * @return the new PreviewJob - * @see PreviewJob::availablePlugins() - * @deprecated Use KIO::filePreview(KFileItemList, QSize, QStringList) in combination - * with the setter-methods instead. Note that the semantics of - * \p enabledPlugins has been slightly changed. - */ - KIO_EXPORT_DEPRECATED PreviewJob *filePreview( const KUrl::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 ); -#endif /** * Creates a PreviewJob to generate a preview image for the given items. diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp index 7d736f6f..4e70948b 100644 --- a/kio/kio/scheduler.cpp +++ b/kio/kio/scheduler.cpp @@ -684,9 +684,6 @@ public: QMap m_windowList; void doJob(SimpleJob *job); -#ifndef KDE_NO_DEPRECATED - void scheduleJob(SimpleJob *job); -#endif void setJobPriority(SimpleJob *job, int priority); void cancelJob(SimpleJob *job); void jobFinished(KIO::SimpleJob *job, KIO::Slave *slave); @@ -795,12 +792,6 @@ void Scheduler::doJob(SimpleJob *job) schedulerPrivate->doJob(job); } -#ifndef KDE_NO_DEPRECATED -void Scheduler::scheduleJob(SimpleJob *job) -{ - schedulerPrivate->scheduleJob(job); -} -#endif void Scheduler::setJobPriority(SimpleJob *job, int priority) { @@ -977,13 +968,6 @@ void SchedulerPrivate::doJob(SimpleJob *job) proto->queueJob(job); } -#ifndef KDE_NO_DEPRECATED -void SchedulerPrivate::scheduleJob(SimpleJob *job) -{ - kDebug(7006) << job; - setJobPriority(job, 1); -} -#endif void SchedulerPrivate::setJobPriority(SimpleJob *job, int priority) { diff --git a/kio/kio/scheduler.h b/kio/kio/scheduler.h index 04edb409..8015f33a 100644 --- a/kio/kio/scheduler.h +++ b/kio/kio/scheduler.h @@ -119,16 +119,6 @@ namespace KIO { */ static void doJob(SimpleJob *job); - /** - * Schedules @p job scheduled for later execution. - * This method is deprecated and just sets the job's priority to 1. It is - * recommended to replace calls to scheduleJob(job) with setJobPriority(job, 1). - * @param job the job to schedule - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static void scheduleJob(SimpleJob *job); -#endif - /** * Changes the priority of @p job; jobs of the same priority run in the order in which * they were created. Jobs of lower numeric priority always run before any diff --git a/kio/kssl/ksslcertdialog.cpp b/kio/kssl/ksslcertdialog.cpp index 218583c9..589c5161 100644 --- a/kio/kssl/ksslcertdialog.cpp +++ b/kio/kssl/ksslcertdialog.cpp @@ -91,11 +91,6 @@ KSSLCertDialog::~KSSLCertDialog() { } -#ifndef KDE_NO_DEPRECATED -void KSSLCertDialog::setup(QStringList certs, bool saveChecked, bool sendChecked) { - setupDialog(certs, saveChecked, sendChecked); -} -#endif void KSSLCertDialog::setupDialog(const QStringList& certs, bool saveChecked, bool sendChecked) { _save->setChecked(saveChecked); diff --git a/kio/kssl/ksslcertdialog.h b/kio/kssl/ksslcertdialog.h index 6de2b589..e7380c89 100644 --- a/kio/kssl/ksslcertdialog.h +++ b/kio/kssl/ksslcertdialog.h @@ -60,18 +60,6 @@ public: */ virtual ~KSSLCertDialog(); - /** - * Setup the dialog. Call this before you display the dialog. - * - * @param certs the list of possible certificates - * @param saveChecked save the checked item for the future - * @param sendChecked send the checked item to the remote host - * @deprecated - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setup(QStringList certs, bool saveChecked = false, bool sendChecked = true); -#endif - /** * Setup the dialog. Call this before you display the dialog. * diff --git a/kio/tests/kdirmodeltest_gui.cpp b/kio/tests/kdirmodeltest_gui.cpp index 143c8fd1..71cacc7b 100644 --- a/kio/tests/kdirmodeltest_gui.cpp +++ b/kio/tests/kdirmodeltest_gui.cpp @@ -79,9 +79,6 @@ int main (int argc, char **argv) treeView->setUniformRowHeights(true); // makes visualRect() much faster treeView->resize(500, 500); treeView->show(); -#ifndef KDE_NO_DEPRECATED - new KMimeTypeResolver(treeView, dirmodel); -#endif treeView->setItemDelegate( new KFileItemDelegate(treeView) ); #endif @@ -90,10 +87,6 @@ int main (int argc, char **argv) listView->setModel(dirmodel); listView->setUniformItemSizes(true); // true in list mode, not in icon mode. listView->show(); -#ifndef KDE_NO_DEPRECATED - new KMimeTypeResolver(listView, dirmodel); - listView->setItemDelegate( new KFileItemDelegate(listView) ); -#endif #endif #if 1 @@ -102,9 +95,6 @@ int main (int argc, char **argv) iconView->setSelectionMode(QListView::ExtendedSelection); iconView->setViewMode(QListView::IconMode); iconView->show(); -#ifndef KDE_NO_DEPRECATED - new KMimeTypeResolver(iconView, dirmodel); -#endif iconView->setItemDelegate( new KFileItemDelegate(iconView) ); #endif diff --git a/kio/tests/kfileitemtest.cpp b/kio/tests/kfileitemtest.cpp index 6d1de820..cff94379 100644 --- a/kio/tests/kfileitemtest.cpp +++ b/kio/tests/kfileitemtest.cpp @@ -96,14 +96,7 @@ void KFileItemTest::testDoesNotExist() void KFileItemTest::testDetach() { KFileItem fileItem(KUrl("/"), QString(), KFileItem::Unknown); -#ifndef KDE_NO_DEPRECATED - fileItem.setExtraData(this, this); - QCOMPARE(fileItem.extraData(this), (const void*)this); -#endif KFileItem fileItem2(fileItem); -#ifndef KDE_NO_DEPRECATED - QCOMPARE(fileItem2.extraData(this), (const void*)this); -#endif QVERIFY(fileItem == fileItem2); QVERIFY(fileItem.d == fileItem2.d); fileItem2.mark(); diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index eb303576..8f5e3e27 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -64,19 +64,6 @@ int main(int argc, char *argv[]) KService::Ptr se; -#ifndef KDE_NO_DEPRECATED - qDebug("Trying to look for Desktop Pager"); - se = KService::serviceByName("Desktop Pager"); - if ( se ) - { - qDebug("Found it !"); - qDebug("Comment is %s", qPrintable(se->comment())); - } - else - { - qDebug("Not found !"); - } -#endif qDebug("Trying to look for kpager"); se = KService::serviceByDesktopName("kpager"); diff --git a/kio/tests/kurlrequestertest.cpp b/kio/tests/kurlrequestertest.cpp index c0ebff90..d774f280 100644 --- a/kio/tests/kurlrequestertest.cpp +++ b/kio/tests/kurlrequestertest.cpp @@ -14,12 +14,8 @@ int main( int argc, char **argv ) qDebug( "Selected url: %s", url.url().toLatin1().constData()); KUrlRequester *req = new KUrlRequester(); -#ifndef KDE_NO_DEPRECATED - KEditListBox *el = new KEditListBox( QLatin1String("Test"), req->customEditor() ); -#else KEditListWidget *el = new KEditListWidget( req->customEditor() ); el->setWindowTitle( QLatin1String("Test") ); -#endif el->show(); KUrlRequester *req1 = new KUrlRequester(); diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp index a240f1ab..cefb4caf 100644 --- a/kparts/browserrun.cpp +++ b/kparts/browserrun.cpp @@ -354,33 +354,6 @@ bool BrowserRun::allowExecution( const QString &mimeType, const KUrl &url ) i18n("Execute File?"), KGuiItem(i18n("Execute")) ) == KMessageBox::Continue ); } -//static, deprecated -#ifndef KDE_NO_DEPRECATED -BrowserRun::AskSaveResult BrowserRun::askSave( const KUrl & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFileName ) -{ - Q_UNUSED(offer); - BrowserOpenOrSaveQuestion question(0, url, mimeType); - question.setSuggestedFileName(suggestedFileName); - const BrowserOpenOrSaveQuestion::Result result = question.askOpenOrSave(); - return result == BrowserOpenOrSaveQuestion::Save ? Save - : BrowserOpenOrSaveQuestion::Open ? Open - : Cancel; -} -#endif - -//static, deprecated -#ifndef KDE_NO_DEPRECATED -BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KUrl & url, const QString& mimeType, const QString & suggestedFileName, int flags ) -{ - BrowserOpenOrSaveQuestion question(0, url, mimeType); - question.setSuggestedFileName(suggestedFileName); - const BrowserOpenOrSaveQuestion::Result result = question.askEmbedOrSave(flags); - return result == BrowserOpenOrSaveQuestion::Save ? Save - : BrowserOpenOrSaveQuestion::Embed ? Open - : Cancel; -} -#endif - // Default implementation, overridden in KHTMLRun void BrowserRun::save( const KUrl & url, const QString & suggestedFileName ) { diff --git a/kparts/browserrun.h b/kparts/browserrun.h index f00fd0ae..ae54d3fd 100644 --- a/kparts/browserrun.h +++ b/kparts/browserrun.h @@ -78,42 +78,8 @@ namespace KParts { bool serverSuggestsSave() const; enum AskSaveResult { Save, Open, Cancel }; - /** - * Ask the user whether to save or open a url in another application. - * @param url the URL in question - * @param offer the application that will be used to open the URL - * @param mimeType the mimetype of the URL - * @param suggestedFileName optional file name suggested by the server - * @return Save, Open or Cancel. - * @deprecated use BrowserOpenOrSaveQuestion - * @code - * BrowserOpenOrSaveQuestion dlg(parent, url, mimeType, suggestedFileName); - * const BrowserOpenOrSaveQuestion::Result res = dlg.askOpenOrSave(); - * @endcode - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED AskSaveResult askSave( const KUrl & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFileName = QString() ); -#endif enum AskEmbedOrSaveFlags { InlineDisposition = 0, AttachmentDisposition = 1 }; - /** - * Similar to askSave but for the case where the current application is - * able to embed the url itself (instead of passing it to another app). - * @param url the URL in question - * @param mimeType the mimetype of the URL - * @param suggestedFileName optional filename suggested by the server - * @param flags set to AttachmentDisposition if suggested by the server - * @return Save, Open or Cancel. - * @deprecated use BrowserOpenOrSaveQuestion - * @code - * BrowserOpenOrSaveQuestion dlg(parent, url, mimeType, suggestedFileName); - * const BrowserOpenOrSaveQuestion::Result res = dlg.askEmbedOrSave(flags); - * // Important: returns Embed now, not Open! - * @endcode - */ -#ifndef KDE_NO_DEPRECATED - static KDE_DEPRECATED AskSaveResult askEmbedOrSave( const KUrl & url, const QString& mimeType, const QString & suggestedFileName = QString(), int flags = 0 ); -#endif // virtual so that KHTML can implement differently (HTML cache) virtual void save( const KUrl & url, const QString & suggestedFileName ); diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h index 21a28528..984c5444 100644 --- a/kparts/componentfactory.h +++ b/kparts/componentfactory.h @@ -23,9 +23,6 @@ #include #include #include -#ifndef KDE_NO_DEPRECATED -#include -#endif #include #include @@ -34,144 +31,6 @@ namespace KParts { namespace ComponentFactory { - /** - * This template function allows to ask the given kparts factory to - * create an instance of the given template type. - * - * Example of usage: - * \code - * KViewPart *doc = KParts::ComponentFactory::createPartInstanceFromFactory<KViewPart>( factory, parent ); - * \endcode - * - * @deprecated use KPluginFactory::create instead - * - * @param factory The factory to ask for the creation of the component - * @param parentWidget the parent widget for the part - * @param parent The parent object (see QObject constructor) - * @param args A list of string arguments, passed to the factory and possibly - * to the component (see KLibFactory) - * @return A pointer to the newly created object or a null pointer if the - * factory was unable to create an object of the given type. - */ -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED T *createPartInstanceFromFactory( KParts::Factory *factory, - QWidget *parentWidget = 0, - QObject *parent = 0, - const QStringList &args = QStringList() ) - { - KParts::Part *object = factory->createPart( parentWidget, - parent, - T::staticMetaObject.className(), - args ); - - T *result = dynamic_cast( object ); - if ( !result ) - delete object; - return result; - } -#endif - - /* - * @deprecated use KPluginFactory::create instead - */ -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED T *createPartInstanceFromLibrary( const char *libraryName, - QWidget *parentWidget = 0, - QObject *parent = 0, - const QStringList &args = QStringList(), - int *error = 0 ) - { - KLibrary *library = KLibLoader::self()->library( QFile::decodeName( libraryName ) ); // compatibility hack - if ( !library ) - { - if ( error ) - *error = KLibLoader::ErrNoLibrary; - return 0; - } - KLibFactory *factory = library->factory(); - if ( !factory ) - { - library->unload(); - if ( error ) - *error = KLibLoader::ErrNoFactory; - return 0; - } - KParts::Factory *partFactory = dynamic_cast( factory ); - if ( !partFactory ) - { - library->unload(); - if ( error ) - *error = KLibLoader::ErrNoFactory; - return 0; - } - T *res = createPartInstanceFromFactory( partFactory, parentWidget, - parent, args ); - if ( !res ) - { - library->unload(); - if ( error ) - *error = KLibLoader::ErrNoComponent; - } - return res; - } -#endif - - /** - * @deprecated use KService::createInstance instead - */ -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED T *createPartInstanceFromService( const KService::Ptr &service, - QWidget *parentWidget = 0, - QObject *parent = 0, - const QStringList &args = QStringList(), - int *error = 0 ) - { - QString library = service->library(); - if ( library.isEmpty() ) - { - if ( error ) - *error = KLibLoader::ErrServiceProvidesNoLibrary; - return 0; - } - - return createPartInstanceFromLibrary( QFile::encodeName( library ).constData(), parentWidget, - parent, args, error ); - } -#endif - -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED T *createPartInstanceFromServices( ServiceIterator begin, - ServiceIterator end, - QWidget *parentWidget = 0, - QObject *parent = 0, - const QStringList &args = QStringList(), - int *error = 0 ) - { - for (; begin != end; ++begin ) - { - KService::Ptr service = *begin; - - if ( error ) - *error = 0; - - T *component = createPartInstanceFromService( service, parentWidget, - parent, args, error ); - if ( component ) - return component; - } - - if ( error ) - *error = KLibLoader::ErrNoServiceFound; - - return 0; - - } -#endif - /** * This method creates and returns a KParts part from a serviceType (e.g. a mimetype). * @@ -200,28 +59,6 @@ namespace KParts * @return A pointer to the newly created object or a null pointer if the * factory was unable to create an object of the given type. */ -#ifndef KDE_NO_DEPRECATED - template - KDE_DEPRECATED T *createPartInstanceFromQuery( const QString &mimeType, - const QString &constraint, - QWidget *parentWidget = 0, - QObject *parent = 0, - const QStringList &args = QStringList(), - int *error = 0 ) - { - const KService::List offers = KMimeTypeTrader::self()->query( mimeType, QLatin1String("KParts/ReadOnlyPart"), constraint ); - if ( offers.isEmpty() ) - { - if ( error ) - *error = KLibLoader::ErrNoServiceFound; - return 0; - } - - return createPartInstanceFromServices( offers.begin(), offers.end(), - parentWidget, - parent, args, error ); - } -#endif // KDE_NO_DEPRECATED } } diff --git a/kparts/mainwindow.cpp b/kparts/mainwindow.cpp index 90948207..d46c9126 100644 --- a/kparts/mainwindow.cpp +++ b/kparts/mainwindow.cpp @@ -64,14 +64,6 @@ MainWindow::MainWindow( QWidget* parent, Qt::WindowFlags f ) PartBase::setPartObject( this ); } -#ifndef KDE_NO_DEPRECATED -MainWindow::MainWindow( QWidget* parent, const char *name, Qt::WindowFlags f ) - : KXmlGuiWindow( parent, f ),d(new MainWindowPrivate()) -{ - setObjectName( name ); - PartBase::setPartObject( this ); -} -#endif MainWindow::~MainWindow() { diff --git a/kparts/mainwindow.h b/kparts/mainwindow.h index 16985753..a01d63f0 100644 --- a/kparts/mainwindow.h +++ b/kparts/mainwindow.h @@ -51,10 +51,6 @@ class KPARTS_EXPORT MainWindow : public KXmlGuiWindow, virtual public PartBase * Constructor, same signature as KMainWindow. */ explicit MainWindow( QWidget* parent = 0, Qt::WindowFlags f = KDE_DEFAULT_WINDOWFLAGS ); - /// @deprecated, remove the name argument and use setObjectName instead -#ifndef KDE_NO_DEPRECATED - KDE_CONSTRUCTOR_DEPRECATED explicit MainWindow( QWidget* parent, const char *name = 0, Qt::WindowFlags f = KDE_DEFAULT_WINDOWFLAGS ); -#endif /** * Destructor. */ diff --git a/kparts/part.cpp b/kparts/part.cpp index f62c83d6..976b11df 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -491,23 +491,7 @@ void ReadOnlyPart::setLocalFilePath( const QString &localFilePath ) d->m_file = localFilePath; } -#ifndef KDE_NO_DEPRECATED -bool ReadOnlyPart::isLocalFileTemporary() const -{ - Q_D(const ReadOnlyPart); - return d->m_bTemp; -} -#endif - -#ifndef KDE_NO_DEPRECATED -void ReadOnlyPart::setLocalFileTemporary( bool temp ) -{ - Q_D(ReadOnlyPart); - - d->m_bTemp = temp; -} -#endif void ReadOnlyPart::setProgressInfoEnabled( bool show ) { diff --git a/kparts/part.h b/kparts/part.h index d55d1d27..b01ee85c 100644 --- a/kparts/part.h +++ b/kparts/part.h @@ -686,20 +686,6 @@ protected: */ virtual void guiActivateEvent( GUIActivateEvent *event ); - /** - * @internal - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED bool isLocalFileTemporary() const; -#endif - - /** - * @internal - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED void setLocalFileTemporary( bool temp ); -#endif - /** * Sets the url associated with this part. */ diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index 22abe106..f82457e0 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -167,26 +167,6 @@ void Plugin::loadPlugins( QObject *parent, const QList &pluginInfos loadPlugins(parent, pluginInfos, KComponentData()); } -// static, deprecated -#ifndef KDE_NO_DEPRECATED -Plugin* Plugin::loadPlugin( QObject * parent, const char* libname ) -{ - Plugin* plugin = KLibLoader::createInstance( libname, parent ); - if ( !plugin ) - return 0; - plugin->d->m_library = libname; - return plugin; -} -#endif - -// static, deprecated -#ifndef KDE_NO_DEPRECATED -Plugin* Plugin::loadPlugin( QObject * parent, const QByteArray &libname ) -{ - return loadPlugin( parent, libname.data() ); -} -#endif - Plugin* Plugin::loadPlugin( QObject * parent, const QString &libname ) { return loadPlugin( parent, libname, "" ); diff --git a/kparts/plugin.h b/kparts/plugin.h index df58cae0..6907d2f6 100644 --- a/kparts/plugin.h +++ b/kparts/plugin.h @@ -165,22 +165,6 @@ protected: */ static QList pluginInfos(const KComponentData &instance); - /** - * @internal - * @return The plugin created from the library @p libname - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static Plugin* loadPlugin( QObject * parent, const char* libname ); -#endif - - /** - * @internal, added only for source compatibility - * @return The plugin created from the library @p libname - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED static Plugin* loadPlugin( QObject * parent, const QByteArray &libname ); -#endif - /** * @internal * @return The plugin created from the library @p libname diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp index 40d0d9bd..00050004 100644 --- a/kutils/kcmoduleloader.cpp +++ b/kutils/kcmoduleloader.cpp @@ -90,16 +90,6 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo& mod, ErrorReporting rep if (module) { return module; } -#ifndef KDE_NO_DEPRECATED - // might be using K_EXPORT_COMPONENT_FACTORY - int error2 = 0; - module = KService::createInstance(mod.service(), parent, args, &error2); - if (module) { - kWarning(1208) << "This module still uses K_EXPORT_COMPONENT_FACTORY. Please port it to use KPluginFactory and K_EXPORT_PLUGIN."; - return module; - } - error += KLibLoader::errorString(error2); -#endif //#ifndef NDEBUG { // get the create_ function @@ -143,20 +133,6 @@ void KCModuleLoader::unloadModule(const KCModuleInfo &mod) loader.unload(); } -#ifndef KDE_NO_DEPRECATED -void KCModuleLoader::showLastLoaderError(QWidget *parent) -{ - KMessageBox::detailedError(parent, - i18n("There was an error loading the module."),i18n("The diagnosis is:
%1" - "

Possible reasons:

  • An error occurred during your last " - "KDE upgrade leaving an orphaned control module
  • You have old third party " - "modules lying around.

Check these points carefully and try to remove " - "the module mentioned in the error message. If this fails, consider contacting " - "your distributor or packager.

", - KLibLoader::self()->lastErrorMessage())); - -} -#endif KCModule* KCModuleLoader::reportError( ErrorReporting report, const QString & text, const QString &details, QWidget * parent ) diff --git a/kutils/kcmoduleloader.h b/kutils/kcmoduleloader.h index 101c6e68..1180ba21 100644 --- a/kutils/kcmoduleloader.h +++ b/kutils/kcmoduleloader.h @@ -92,17 +92,6 @@ namespace KCModuleLoader */ KCMUTILS_EXPORT void unloadModule(const KCModuleInfo &mod); - /** - * Display a message box explaining an error occurred and possible - * reasons to why. - * - * @deprecated Use a constructor with ErrorReporting set to Dialog to show a - * message box like this function did. - */ -#ifndef KDE_NO_DEPRECATED - KCMUTILS_EXPORT KDE_DEPRECATED void showLastLoaderError(QWidget *parent); -#endif - /** * Returns a KCModule containing the messages @p report and @p text. *