File: kbookmarkdialogtest.cpp

package info (click to toggle)
kf6-kbookmarks 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 9,860 kB
  • sloc: cpp: 2,552; sh: 14; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
    SPDX-FileCopyrightText: 2013 David Faure <faure+bluesystems@kde.org>

    SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/

#include <QApplication>
#include <QPushButton>
#include <QStandardPaths>

#include <kbookmarkdialog.h>
#include <kbookmarkmanager.h>

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    const QString bookmarksFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/konqueror/bookmarks.xml");
    KBookmarkManager manager(bookmarksFile);
    KBookmarkDialog dlg(&manager);
    dlg.addBookmark(QStringLiteral("KDE"), QUrl(QStringLiteral("http://www.kde.org")), QStringLiteral("www")); // calls exec()
    return 0;
}