Changeset View
Changeset View
Standalone View
Standalone View
src/core/krecentdocument.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 56 | public: | |||
---|---|---|---|---|---|
76 | * which isn't always flexible enough. | 76 | * which isn't always flexible enough. | ||
77 | * This method is used when an application launches another one to open a document. | 77 | * This method is used when an application launches another one to open a document. | ||
78 | * | 78 | * | ||
79 | * @param url The url to add. | 79 | * @param url The url to add. | ||
80 | * @param desktopEntryName The desktopEntryName of the service to use for opening this document. | 80 | * @param desktopEntryName The desktopEntryName of the service to use for opening this document. | ||
81 | */ | 81 | */ | ||
82 | static void add(const QUrl &url, const QString &desktopEntryName); | 82 | static void add(const QUrl &url, const QString &desktopEntryName); | ||
83 | 83 | | |||
84 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
84 | /** | 85 | /** | ||
85 | * | 86 | * | ||
86 | * Add a new item to the Recent Document menu. Calls add( url ). | 87 | * Add a new item to the Recent Document menu. Calls add( url ). | ||
87 | * | 88 | * | ||
88 | * @param documentStr The full path to the document or URL to add. | 89 | * @param documentStr The full path to the document or URL to add. | ||
89 | * @param isURL Set to @p true if @p documentStr is an URL and not a local file path. | 90 | * @param isURL Set to @p true if @p documentStr is an URL and not a local file path. | ||
90 | * @deprecated call add(QUrl(str)) if isURL=true, and add(QUrl::fromLocalFile(str)) if isURL=false. | 91 | * @deprecated Since 5.0, call add(QUrl(str)) if isURL=true, and add(QUrl::fromLocalFile(str)) if isURL=false. | ||
91 | */ | 92 | */ | ||
92 | #ifndef KIOCORE_NO_DEPRECATED | 93 | KIOCORE_DEPRECATED_VERSION(5, 0, "Use KRecentDocument::add(const QUrl &)") | ||
93 | static KIOCORE_DEPRECATED void add(const QString &documentStr, bool isUrl = false) | 94 | static void add(const QString &documentStr, bool isUrl = false) | ||
94 | { | 95 | { | ||
95 | if (isUrl) { | 96 | if (isUrl) { | ||
96 | add(QUrl(documentStr)); | 97 | add(QUrl(documentStr)); | ||
97 | } else { | 98 | } else { | ||
98 | add(QUrl::fromLocalFile(documentStr)); | 99 | add(QUrl::fromLocalFile(documentStr)); | ||
99 | } | 100 | } | ||
100 | } | 101 | } | ||
101 | #endif | 102 | #endif | ||
Show All 19 Lines |