Changeset View
Changeset View
Standalone View
Standalone View
src/kdesvn.cpp
Show All 29 Lines | |||||
30 | #include <QStatusBar> | 30 | #include <QStatusBar> | ||
31 | #include <QTimer> | 31 | #include <QTimer> | ||
32 | 32 | | |||
33 | #include <ksharedconfig.h> | 33 | #include <ksharedconfig.h> | ||
34 | #include <kconfig.h> | 34 | #include <kconfig.h> | ||
35 | #include <kconfiggroup.h> | 35 | #include <kconfiggroup.h> | ||
36 | #include <khelpmenu.h> | 36 | #include <khelpmenu.h> | ||
37 | #include <KActionCollection> | 37 | #include <KActionCollection> | ||
38 | #include <kbookmarks_version.h> | ||||
38 | #include <KBookmarkManager> | 39 | #include <KBookmarkManager> | ||
39 | #include <KLocalizedString> | 40 | #include <KLocalizedString> | ||
40 | #include <KMessageBox> | 41 | #include <KMessageBox> | ||
41 | #include <KPluginFactory> | 42 | #include <KPluginFactory> | ||
42 | #include <KPluginLoader> | 43 | #include <KPluginLoader> | ||
43 | #include <KRecentFilesAction> | 44 | #include <KRecentFilesAction> | ||
44 | #include <KStandardAction> | 45 | #include <KStandardAction> | ||
45 | #include <KToggleAction> | 46 | #include <KToggleAction> | ||
Show All 30 Lines | 67 | #endif | |||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | m_bookmarkFile = bookmarkDir.absolutePath()+ QLatin1String("/bookmarks.xml"); | 79 | m_bookmarkFile = bookmarkDir.absolutePath()+ QLatin1String("/bookmarks.xml"); | ||
79 | m_BookmarkManager = KBookmarkManager::managerForExternalFile(m_bookmarkFile); | 80 | m_BookmarkManager = KBookmarkManager::managerForExternalFile(m_bookmarkFile); | ||
80 | m_BookmarksActionmenu = new KBookmarkActionMenu(m_BookmarkManager->root(), | 81 | m_BookmarksActionmenu = new KBookmarkActionMenu(m_BookmarkManager->root(), | ||
81 | i18n("&Bookmarks"), this); | 82 | i18n("&Bookmarks"), this); | ||
82 | 83 | | |||
83 | actionCollection()->addAction(QStringLiteral("bookmarks"), m_BookmarksActionmenu); | 84 | actionCollection()->addAction(QStringLiteral("bookmarks"), m_BookmarksActionmenu); | ||
84 | m_Bookmarkactions = new KActionCollection(static_cast<QWidget *>(this)); | 85 | m_Bookmarkactions = new KActionCollection(static_cast<QWidget *>(this)); | ||
ahmadsamir: I am not sure that passing m_Bookmarkactions to the KBookmarkMenu ctor actually worked for… | |||||
86 | | ||||
87 | #if KBOOKMARKS_VERSION < QT_VERSION_CHECK(5, 69, 0) | ||||
85 | m_pBookmarkMenu = new KBookmarkMenu(m_BookmarkManager, this, m_BookmarksActionmenu->menu(), m_Bookmarkactions); | 88 | m_pBookmarkMenu = new KBookmarkMenu(m_BookmarkManager, this, m_BookmarksActionmenu->menu(), m_Bookmarkactions); | ||
89 | #else | ||||
90 | QMenu *parentMenu = m_BookmarksActionmenu->menu(); | ||||
91 | m_pBookmarkMenu = new KBookmarkMenu(m_BookmarkManager, this, parentMenu); | ||||
92 | actionCollection()->addActions(parentMenu->actions()); | ||||
93 | #endif | ||||
94 | | ||||
86 | m_pBookmarkMenu->setParent(this); // clear when kdesvn window gets destroyed | 95 | m_pBookmarkMenu->setParent(this); // clear when kdesvn window gets destroyed | ||
87 | 96 | | |||
88 | #ifdef EXTRA_KDE_LIBPATH | 97 | #ifdef EXTRA_KDE_LIBPATH | ||
89 | QCoreApplication::addLibraryPath(QString::fromLocal8Bit(EXTRA_KDE_LIBPATH)) | 98 | QCoreApplication::addLibraryPath(QString::fromLocal8Bit(EXTRA_KDE_LIBPATH)) | ||
90 | #endif | 99 | #endif | ||
91 | // this routine will find and load our Part. it finds the Part by | 100 | // this routine will find and load our Part. it finds the Part by | ||
92 | // name which is a bad idea usually.. but it's alright in this | 101 | // name which is a bad idea usually.. but it's alright in this | ||
93 | // case since our Part is made for this Shell | 102 | // case since our Part is made for this Shell | ||
▲ Show 20 Lines • Show All 354 Lines • Show Last 20 Lines |
I am not sure that passing m_Bookmarkactions to the KBookmarkMenu ctor actually worked for kbookmarks < 5.69; however I couldn't easily test as I've already upgraded to kbookmarks-5.70 git snapshot.