Changeset View
Changeset View
Standalone View
Standalone View
krusader/BookMan/krbookmarkbutton.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 34 | { | |||
---|---|---|---|---|---|
43 | acmBookmarks->setDelayed(false); | 43 | acmBookmarks->setDelayed(false); | ||
44 | // TODO KF5 : explicit cast as QMenu doesn't have those methods | 44 | // TODO KF5 : explicit cast as QMenu doesn't have those methods | ||
45 | //(acmBookmarks->menu())->setKeyboardShortcutsEnabled(true); | 45 | //(acmBookmarks->menu())->setKeyboardShortcutsEnabled(true); | ||
46 | //(acmBookmarks->menu())->setKeyboardShortcutsExecute(true); | 46 | //(acmBookmarks->menu())->setKeyboardShortcutsExecute(true); | ||
47 | 47 | | |||
48 | setMenu(acmBookmarks->menu()); | 48 | setMenu(acmBookmarks->menu()); | ||
49 | connect(acmBookmarks->menu(), SIGNAL(aboutToShow()), this, SLOT(populate())); | 49 | connect(acmBookmarks->menu(), SIGNAL(aboutToShow()), this, SLOT(populate())); | ||
50 | connect(acmBookmarks->menu(), SIGNAL(aboutToShow()), this, SIGNAL(aboutToShow())); | 50 | connect(acmBookmarks->menu(), SIGNAL(aboutToShow()), this, SIGNAL(aboutToShow())); | ||
51 | populate(); | | |||
52 | } | 51 | } | ||
53 | 52 | | |||
54 | void KrBookmarkButton::populate() | 53 | void KrBookmarkButton::populate() | ||
55 | { | 54 | { | ||
56 | krBookMan->populate(static_cast<QMenu*>(menu())); | 55 | krBookMan->populate(static_cast<QMenu*>(menu())); | ||
57 | } | 56 | } | ||
58 | 57 | | |||
59 | void KrBookmarkButton::showMenu() | 58 | void KrBookmarkButton::showMenu() | ||
60 | { | 59 | { | ||
61 | populate(); | 60 | populate(); | ||
62 | menu()->exec(mapToGlobal(QPoint(0, height()))); | 61 | menu()->exec(mapToGlobal(QPoint(0, height()))); | ||
63 | } | 62 | } | ||
64 | 63 | |