diff --git a/README b/README index 203a29e2..64041c10 100644 --- a/README +++ b/README @@ -1,50 +1,50 @@ KBibTeX ======= -Copyright: 2004-2018 Thomas Fischer +Copyright: 2004-2019 Thomas Fischer Author/Maintainer: Thomas Fischer Description ----------- The program KBibTeX is a bibliography editor by KDE. Its main purpose is to provide a user-friendly interface to BibTeX files. Homepage -------- Visit https://userbase.kde.org/KBibTeX for more information. Dependencies ------------ KBibTeX makes heavily use of KDE Frameworks 5 and therefore Qt 5. Furthermore a number of additional dependencies exist to, for example, parse PDF or XML files. In detail, the following dependencies exist: * Compile time - Qt 5.6 or later, required components Core, Widgets, and Network - KDE Frameworks 5.26 or later, required components I18n, XmlGui, KIO, IconThemes, ItemViews, Completion, Parts, CoreAddons, Service, DocTools, Wallet, Crash, and has helper package: extra-cmake-modules (ECM) - libxml2 (any recent version should suffice) - libxslt (any recent version should suffice) - Poppler 0.32 or later with Qt5 bindings installed - QCA 2.0 or later with Qt5 bindings installed - ICU (any recent version should suffice), required components uc and i18n - QtOAuth 2.0 or later (OPTIONAL) * Runtime - BibUtils to import/export various bibliography formats In case this list is incomplete, wrong, or out-dated, please file a bug for KBibTeX at https://bugs.kde.org/ diff --git a/src/parts/partfactory.cpp b/src/parts/partfactory.cpp index 26ae6498..993d391e 100644 --- a/src/parts/partfactory.cpp +++ b/src/parts/partfactory.cpp @@ -1,63 +1,63 @@ /*************************************************************************** - * Copyright (C) 2004-2018 by Thomas Fischer * + * Copyright (C) 2004-2019 by Thomas Fischer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, see . * ***************************************************************************/ #include "partfactory.h" #include #include #include #include "part.h" #include "kbibtex-version.h" #include "kbibtex-git-info.h" #include "logging_parts.h" class KBibTeXPartFactory::Private { public: KAboutData aboutData; Private() - : aboutData(QStringLiteral("kbibtexpart"), i18n("KBibTeXPart"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2018 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")) + : aboutData(QStringLiteral("kbibtexpart"), i18n("KBibTeXPart"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2019 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")) { aboutData.setOrganizationDomain(QByteArray("kde.org")); aboutData.setDesktopFileName(QStringLiteral("org.kde.kbibtex")); aboutData.addAuthor(i18n("Thomas Fischer"), i18n("Maintainer"), QStringLiteral("fischer@unix-ag.uni-kl.de")); } }; KBibTeXPartFactory::KBibTeXPartFactory() : KPluginFactory(), d(new KBibTeXPartFactory::Private()) { /// nothing } KBibTeXPartFactory::~KBibTeXPartFactory() { delete d; } QObject *KBibTeXPartFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) { Q_UNUSED(iface); Q_UNUSED(args) Q_UNUSED(keyword); qCInfo(LOG_KBIBTEX_PARTS()) << "Creating KBibTeX Part of version" << (strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING) : QLatin1String(KBIBTEX_VERSION_STRING)); KBibTeXPart *part = new KBibTeXPart(parentWidget, parent, d->aboutData); return part; } diff --git a/src/program/program.cpp b/src/program/program.cpp index 4cb73a86..173b0e6b 100644 --- a/src/program/program.cpp +++ b/src/program/program.cpp @@ -1,125 +1,125 @@ /*************************************************************************** - * Copyright (C) 2004-2018 by Thomas Fischer * + * Copyright (C) 2004-2019 by Thomas Fischer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, see . * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include "mainwindow.h" #include "kbibtex-version.h" #include "kbibtex-git-info.h" #include "logging_program.h" int main(int argc, char *argv[]) { if (strlen(KBIBTEX_GIT_INFO_STRING) > 0) { /// In Git versions, enable debugging by default QLoggingCategory::setFilterRules(QStringLiteral("kbibtex.*.debug = true")); } QApplication programCore(argc, argv); KCrash::initialize(); KLocalizedString::setApplicationDomain("kbibtex"); - KAboutData aboutData(QStringLiteral("kbibtex"), i18n("KBibTeX"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2018 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")); + KAboutData aboutData(QStringLiteral("kbibtex"), i18n("KBibTeX"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2019 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")); aboutData.setOrganizationDomain(QByteArray("kde.org")); aboutData.setDesktopFileName(QStringLiteral("org.kde.kbibtex")); aboutData.addAuthor(i18n("Thomas Fischer"), i18n("Maintainer"), QStringLiteral("fischer@unix-ag.uni-kl.de")); KAboutData::setApplicationData(aboutData); programCore.setApplicationName(aboutData.componentName()); programCore.setOrganizationDomain(aboutData.organizationDomain()); programCore.setApplicationVersion(aboutData.version()); programCore.setApplicationDisplayName(aboutData.displayName()); programCore.setWindowIcon(QIcon::fromTheme(QStringLiteral("kbibtex"))); qCInfo(LOG_KBIBTEX_PROGRAM) << "Starting KBibTeX version" << (strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING) : QLatin1String(KBIBTEX_VERSION_STRING)); QCommandLineParser cmdLineParser; cmdLineParser.addHelpOption(); cmdLineParser.addVersionOption(); cmdLineParser.addPositionalArgument(QStringLiteral("urls"), i18n("File(s) to load."), QStringLiteral("[urls...]")); cmdLineParser.process(programCore); aboutData.processCommandLine(&cmdLineParser); KBibTeXMainWindow *mainWindow = new KBibTeXMainWindow(); const QStringList urls = cmdLineParser.positionalArguments(); /// Process arguments if (!urls.isEmpty()) { static const QRegularExpression protocolCheckerRegExp(QStringLiteral("^[a-zA-Z]+:")); for (const QString &url : urls) { const QUrl u = protocolCheckerRegExp.match(url).hasMatch() ? QUrl::fromUserInput(url) : QUrl::fromLocalFile(url); mainWindow->openDocument(u); } } mainWindow->show(); KService::Ptr service = KService::serviceByStorageId(QStringLiteral("kbibtexpart.desktop")); if (service.data() == nullptr) { /// Dump some environment variables that may be helpful /// in tracing back why the part's .desktop file was not found qCDebug(LOG_KBIBTEX_PROGRAM) << "PATH=" << getenv("PATH"); qCDebug(LOG_KBIBTEX_PROGRAM) << "LD_LIBRARY_PATH=" << getenv("LD_LIBRARY_PATH"); qCDebug(LOG_KBIBTEX_PROGRAM) << "XDG_DATA_DIRS=" << getenv("XDG_DATA_DIRS"); qCDebug(LOG_KBIBTEX_PROGRAM) << "QT_PLUGIN_PATH=" << getenv("QT_PLUGIN_PATH"); qCDebug(LOG_KBIBTEX_PROGRAM) << "KDEDIRS=" << getenv("KDEDIRS"); qCDebug(LOG_KBIBTEX_PROGRAM) << "QCoreApplication::libraryPaths=" << programCore.libraryPaths().join(QLatin1Char(':')); KMessageBox::error(mainWindow, i18n("KBibTeX seems to be not installed completely. KBibTeX could not locate its own KPart.\n\nOnly limited functionality will be available."), i18n("Incomplete KBibTeX Installation")); } else { qCInfo(LOG_KBIBTEX_PROGRAM) << "Located KPart service:" << service->library() << "with description" << service->comment() << "from library" << service->library(); } /* /// started by session management? if (programCore.isSessionRestored()) { RESTORE(KBibTeXMainWindow()); } else { /// no session.. just start up normally KBibTeXMainWindow *mainWindow = new KBibTeXMainWindow(); KCmdLineArgs *arguments = KCmdLineArgs::parsedArgs(); for (int i = 0; i < arguments->count(); ++i) { const QUrl url = arguments->url(i); if (url.isValid()) mainWindow->openDocument(url); } mainWindow->show(); arguments->clear(); } */ return programCore.exec(); } diff --git a/src/test/main.cpp b/src/test/main.cpp index aa5e07a6..c3cc72f2 100644 --- a/src/test/main.cpp +++ b/src/test/main.cpp @@ -1,40 +1,40 @@ /*************************************************************************** - * Copyright (C) 2004-2018 by Thomas Fischer * + * Copyright (C) 2004-2019 by Thomas Fischer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, see . * ***************************************************************************/ #include #include #include #include #include "kbibtextest.h" #include "kbibtex-version.h" #include "kbibtex-git-info.h" int main(int argc, char *argv[]) { QApplication programCore(argc, argv); - KAboutData aboutData(QStringLiteral("kbibtextest"), i18n("KBibTeX Test"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2018 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")); + KAboutData aboutData(QStringLiteral("kbibtextest"), i18n("KBibTeX Test"), strlen(KBIBTEX_GIT_INFO_STRING) > 0 ? QLatin1String(KBIBTEX_GIT_INFO_STRING ", near " KBIBTEX_VERSION_STRING) : QLatin1String(KBIBTEX_VERSION_STRING), i18n("A BibTeX editor by KDE"), KAboutLicense::GPL_V2, i18n("Copyright 2004-2019 Thomas Fischer"), QString(), QStringLiteral("https://userbase.kde.org/KBibTeX")); aboutData.addAuthor(i18n("Thomas Fischer"), i18n("Maintainer"), QStringLiteral("fischer@unix-ag.uni-kl.de")); KAboutData::setApplicationData(aboutData); QPointer test = new KBibTeXTest(); test->exec(); return programCore.exec(); }