Changeset View
Changeset View
Standalone View
Standalone View
src/kbookmarkdialog.cpp
Show All 26 Lines | |||||
27 | #include <QFormLayout> | 27 | #include <QFormLayout> | ||
28 | #include <QInputDialog> | 28 | #include <QInputDialog> | ||
29 | #include <QLabel> | 29 | #include <QLabel> | ||
30 | #include <QLineEdit> | 30 | #include <QLineEdit> | ||
31 | #include <QPushButton> | 31 | #include <QPushButton> | ||
32 | #include <QTreeWidget> | 32 | #include <QTreeWidget> | ||
33 | #include <QHeaderView> | 33 | #include <QHeaderView> | ||
34 | 34 | | |||
35 | #include <kiconloader.h> | 35 | #include <QIcon> | ||
36 | #include <kguiitem.h> | 36 | #include <kguiitem.h> | ||
37 | 37 | | |||
38 | KBookmarkDialogPrivate::KBookmarkDialogPrivate(KBookmarkDialog *q) | 38 | KBookmarkDialogPrivate::KBookmarkDialogPrivate(KBookmarkDialog *q) | ||
39 | : q(q) | 39 | : q(q) | ||
40 | , folderTree(nullptr) | 40 | , folderTree(nullptr) | ||
41 | , layout(false) | 41 | , layout(false) | ||
42 | { | 42 | { | ||
43 | } | 43 | } | ||
▲ Show 20 Lines • Show All 335 Lines • ▼ Show 20 Line(s) | |||||
379 | } | 379 | } | ||
380 | 380 | | |||
381 | /********************************************************************/ | 381 | /********************************************************************/ | ||
382 | 382 | | |||
383 | KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidget *tree) | 383 | KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidget *tree) | ||
384 | : QTreeWidgetItem(tree), m_address(QLatin1String("")) | 384 | : QTreeWidgetItem(tree), m_address(QLatin1String("")) | ||
385 | { | 385 | { | ||
386 | setText(0, KBookmarkDialog::tr("Bookmarks", "name of the container of all browser bookmarks")); | 386 | setText(0, KBookmarkDialog::tr("Bookmarks", "name of the container of all browser bookmarks")); | ||
387 | setIcon(0, SmallIcon(QStringLiteral("bookmarks"))); | 387 | setIcon(0, QIcon::fromTheme(QStringLiteral("bookmarks"))); | ||
388 | tree->expandItem(this); | 388 | tree->expandItem(this); | ||
389 | tree->setCurrentItem(this); | 389 | tree->setCurrentItem(this); | ||
390 | tree->setItemSelected(this, true); | 390 | tree->setItemSelected(this, true); | ||
391 | } | 391 | } | ||
392 | 392 | | |||
393 | KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidgetItem *parent, QTreeWidget *tree, const KBookmarkGroup &bk) | 393 | KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidgetItem *parent, QTreeWidget *tree, const KBookmarkGroup &bk) | ||
394 | : QTreeWidgetItem(parent) | 394 | : QTreeWidgetItem(parent) | ||
395 | { | 395 | { | ||
396 | setIcon(0, SmallIcon(bk.icon())); | 396 | setIcon(0, QIcon::fromTheme(bk.icon())); | ||
397 | setText(0, bk.fullText()); | 397 | setText(0, bk.fullText()); | ||
398 | tree->expandItem(this); | 398 | tree->expandItem(this); | ||
399 | m_address = bk.address(); | 399 | m_address = bk.address(); | ||
400 | } | 400 | } | ||
401 | 401 | | |||
402 | KBookmarkTreeItem::~KBookmarkTreeItem() | 402 | KBookmarkTreeItem::~KBookmarkTreeItem() | ||
403 | { | 403 | { | ||
404 | } | 404 | } | ||
405 | 405 | | |||
406 | QString KBookmarkTreeItem::address() | 406 | QString KBookmarkTreeItem::address() | ||
407 | { | 407 | { | ||
408 | return m_address; | 408 | return m_address; | ||
409 | } | 409 | } |