diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 48b04f4e..6c86a0e3 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,168 +1,167 @@ set( kbibtexgui_LIB_SRCS element/associatedfilesui.cpp element/elementeditor.cpp element/elementwidgets.cpp element/findpdfui.cpp field/colorlabelwidget.cpp field/fieldinput.cpp field/fieldlineedit.cpp field/fieldlistedit.cpp file/basicfileview.cpp file/clipboard.cpp file/filedelegate.cpp file/fileview.cpp file/partwidget.cpp file/findduplicatesui.cpp file/sortfilterfilemodel.cpp widgets/filesettingswidget.cpp widgets/filterbar.cpp widgets/hidingtabwidget.cpp widgets/menulineedit.cpp widgets/radiobuttontreeview.cpp widgets/rangewidget.cpp widgets/starrating.cpp config/entrylayout.cpp preferences/kbibtexpreferencesdialog.cpp preferences/settingsabstractwidget.cpp preferences/settingscolorlabelwidget.cpp preferences/settingsfileexporterpdfpswidget.cpp preferences/settingsfileexporterwidget.cpp preferences/settingsgeneralwidget.cpp preferences/settingsglobalkeywordswidget.cpp preferences/settingsidsuggestionswidget.cpp preferences/settingsidsuggestionseditor.cpp preferences/settingsuserinterfacewidget.cpp guihelper.cpp italictextitemmodel.cpp valuelistmodel.cpp delayedexecutiontimer.cpp logging_gui.cpp ) if(UNITY_BUILD) enable_unity_build(kbibtexgui kbibtexgui_LIB_SRCS) endif(UNITY_BUILD) add_library(kbibtexgui SHARED ${kbibtexgui_LIB_SRCS} ) generate_export_header(kbibtexgui) add_library(KBibTeX::GUI ALIAS kbibtexgui) set_target_properties(kbibtexgui PROPERTIES EXPORT_NAME "kbibtexgui" VERSION ${KBIBTEX_RELEASE_VERSION} SOVERSION ${KBIBTEX_SOVERSION} ) target_include_directories(kbibtexgui INTERFACE $ ) target_link_libraries(kbibtexgui PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets - # TODO refactor to be private - KF5::IconThemes - KBibTeX::Data - KBibTeX::Global - KBibTeX::Networking PRIVATE Poppler::Qt5 Qt5::Concurrent Qt5::XmlPatterns KF5::ConfigCore KF5::ConfigGui KF5::I18n + KF5::IconThemes KF5::WidgetsAddons KF5::KIOCore KF5::KIOFileWidgets KF5::Parts KF5::TextEditor KBibTeX::Config + KBibTeX::Data + KBibTeX::Global KBibTeX::IO + KBibTeX::Networking KBibTeX::Processing ) install( TARGETS kbibtexgui EXPORT kbibtexgui-targets LIBRARY NAMELINK_SKIP ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) set_target_properties(kbibtexgui PROPERTIES EXPORT_NAME "GUI" ) ecm_generate_headers(kbibtexgui_HEADERS HEADER_NAMES element/AssociatedFilesUI element/ElementEditor element/ElementWidgets element/FindPDFUI field/ColorLabelWidget field/FieldInput field/FieldLineEdit field/FieldListEdit file/BasicFileView file/Clipboard file/FileDelegate file/FileView file/FindDuplicatesUI file/PartWidget file/SortFilterFileModel widgets/FileSettingsWidget widgets/FilterBar widgets/HidingTabWidget widgets/MenuLineEdit widgets/RadioButtonTreeView widgets/RangeWidget widgets/StarRating config/EntryLayout preferences/KBibTeXPreferencesDialog preferences/SettingsAbstractWidget preferences/SettingsColorLabelWidget preferences/SettingsFileExporterPDFPSWidget preferences/SettingsFileExporterWidget preferences/SettingsGeneralWidget preferences/SettingsGlobalKeywordsWidget preferences/SettingsIdSuggestionsEditor preferences/SettingsIdSuggestionsWidget preferences/SettingsUserInterfaceWidget ItalicTextItemModel ValueListModel GUIHelper REQUIRED_HEADERS kbibtexgui_HEADERS ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kbibtexgui_export.h ${kbibtexgui_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KBibTeX/gui COMPONENT Devel ) include(CMakePackageConfigHelpers) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXGUI-configVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion ) configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/KBibTeXGUI-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXGUI-config.cmake INSTALL_DESTINATION ${KDE_INSTALL_LIBDIR}/cmake/KBibTeX ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXGUI-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXGUI-configVersion.cmake DESTINATION ${KDE_INSTALL_LIBDIR}/cmake/KBibTeX ) diff --git a/src/networking/CMakeLists.txt b/src/networking/CMakeLists.txt index a44fee85..60c172da 100644 --- a/src/networking/CMakeLists.txt +++ b/src/networking/CMakeLists.txt @@ -1,157 +1,156 @@ set( kbibtexnetworking_LIB_SRCS onlinesearch/onlinesearchabstract.cpp onlinesearch/onlinesearchbibsonomy.cpp onlinesearch/onlinesearcharxiv.cpp onlinesearch/onlinesearchsciencedirect.cpp onlinesearch/onlinesearchgooglescholar.cpp onlinesearch/onlinesearchieeexplore.cpp onlinesearch/onlinesearchpubmed.cpp onlinesearch/onlinesearchacmportal.cpp onlinesearch/onlinesearchspringerlink.cpp onlinesearch/onlinesearchjstor.cpp onlinesearch/onlinesearchmathscinet.cpp onlinesearch/onlinesearchmrlookup.cpp onlinesearch/onlinesearchinspirehep.cpp onlinesearch/onlinesearchcernds.cpp onlinesearch/onlinesearchingentaconnect.cpp onlinesearch/onlinesearchsimplebibtexdownload.cpp onlinesearch/onlinesearchgeneral.cpp onlinesearch/onlinesearchsoanasaads.cpp onlinesearch/onlinesearchideasrepec.cpp onlinesearch/onlinesearchdoi.cpp onlinesearch/onlinesearchbiorxiv.cpp onlinesearch/onlinesearchsemanticscholar.cpp zotero/api.cpp zotero/collectionmodel.cpp zotero/collection.cpp zotero/items.cpp zotero/groups.cpp zotero/oauthwizard.cpp zotero/tags.cpp zotero/tagmodel.cpp associatedfiles.cpp findpdf.cpp internalnetworkaccessmanager.cpp logging_networking.cpp ) if(UNITY_BUILD) enable_unity_build(kbibtexnetworking kbibtexnetworking_LIB_SRCS) endif(UNITY_BUILD) add_library(kbibtexnetworking SHARED ${kbibtexnetworking_LIB_SRCS} ) generate_export_header(kbibtexnetworking) add_library(KBibTeX::Networking ALIAS kbibtexnetworking) set_target_properties(kbibtexnetworking PROPERTIES EXPORT_NAME "kbibtexnetworking" VERSION ${KBIBTEX_RELEASE_VERSION} SOVERSION ${KBIBTEX_SOVERSION} ) target_include_directories(kbibtexnetworking INTERFACE $ ) target_link_libraries(kbibtexnetworking PUBLIC Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets - # TODO refactor code to not expose config interface - KF5::ConfigCore - KF5::ConfigGui KBibTeX::Data PRIVATE Poppler::Qt5 Qt5::DBus Qt5::NetworkAuth + KF5::ConfigCore + KF5::ConfigGui KF5::WidgetsAddons KF5::I18n KF5::KIOCore KF5::KIOFileWidgets KBibTeX::Config KBibTeX::Global KBibTeX::IO ) install( TARGETS kbibtexnetworking EXPORT kbibtexnetworking-targets LIBRARY NAMELINK_SKIP ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) set_target_properties(kbibtexnetworking PROPERTIES EXPORT_NAME "Networking" ) ecm_generate_headers(kbibtexnetworking_HEADERS HEADER_NAMES AssociatedFiles FindPDF InternalNetworkAccessManager onlinesearch/OnlineSearchAbstract onlinesearch/OnlineSearchGeneral onlinesearch/OnlineSearchAcmPortal onlinesearch/OnlineSearchArXiv onlinesearch/OnlineSearchBibsonomy onlinesearch/OnlineSearchBioRxiv onlinesearch/OnlineSearchCERNDS onlinesearch/OnlineSearchDOI onlinesearch/OnlineSearchGoogleScholar onlinesearch/OnlineSearchIDEASRePEc onlinesearch/OnlineSearchIEEEXplore onlinesearch/OnlineSearchIngentaConnect onlinesearch/OnlineSearchInspireHep onlinesearch/OnlineSearchJStor onlinesearch/OnlineSearchMathSciNet onlinesearch/OnlineSearchMRLookup onlinesearch/OnlineSearchPubMed onlinesearch/OnlineSearchScienceDirect onlinesearch/OnlineSearchSemanticScholar onlinesearch/OnlineSearchSimpleBibTeXDownload onlinesearch/OnlineSearchSOANASAADS onlinesearch/OnlineSearchSpringerLink zotero/API zotero/Collection zotero/CollectionModel zotero/Groups zotero/Items zotero/OAuthWizard zotero/TagModel zotero/Tags REQUIRED_HEADERS kbibtexnetworking_HEADERS ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kbibtexnetworking_export.h ${kbibtexnetworking_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KBibTeX/networking COMPONENT Devel ) include(CMakePackageConfigHelpers) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXNetworking-configVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion ) configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/KBibTeXNetworking-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXNetworking-config.cmake INSTALL_DESTINATION ${KDE_INSTALL_LIBDIR}/cmake/KBibTeX ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXNetworking-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/KBibTeXNetworking-configVersion.cmake DESTINATION ${KDE_INSTALL_LIBDIR}/cmake/KBibTeX ) diff --git a/src/program/CMakeLists.txt b/src/program/CMakeLists.txt index f8629314..28397e83 100644 --- a/src/program/CMakeLists.txt +++ b/src/program/CMakeLists.txt @@ -1,127 +1,128 @@ set( kbibtex_SRCS program.cpp mainwindow.cpp documentlist.cpp mdiwidget.cpp docklets/statistics.cpp docklets/referencepreview.cpp docklets/documentpreview.cpp docklets/valuelist.cpp docklets/searchform.cpp docklets/searchresults.cpp docklets/elementform.cpp docklets/filesettings.cpp docklets/zoterobrowser.cpp openfileinfo.cpp logging_program.cpp ) if(UNITY_BUILD AND NOT WIN32) # FIXME: Unity build of programs breaks on Windows enable_unity_build(kbibtex kbibtex_SRCS) endif(UNITY_BUILD AND NOT WIN32) ecm_add_app_icon(kbibtex_SRCS ICONS ${CMAKE_SOURCE_DIR}/icons/16-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/22-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/32-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/48-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/64-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/128-apps-kbibtex.png ) add_executable(kbibtex ${kbibtex_SRCS} ) add_dependencies(kbibtex generate-kbibtex-git-info ) target_include_directories(kbibtex PRIVATE ${CMAKE_BINARY_DIR} ) target_link_libraries(kbibtex PRIVATE Qt5::Core Qt5::Gui KF5::CoreAddons KF5::Crash KF5::I18n + KF5::IconThemes KF5::KIOCore KF5::KIOFileWidgets KF5::Parts KF5::Wallet KBibTeX::Global KBibTeX::GUI KBibTeX::IO KBibTeX::Networking KBibTeX::Processing ) if(Qt5WebEngineWidgets_FOUND) message(STATUS "Using QtWebEngine to render complex HTML content") # Once CMake 3.12.x is minimum requirement, use 'add_compile_definitions' add_definitions( -DHAVE_WEBENGINEWIDGETS ) target_link_libraries(kbibtex PRIVATE Qt5::WebEngineWidgets ) else() if(Qt5WebKitWidgets_FOUND) message(STATUS "Using QtWebKit to render complex HTML content") # Once CMake 3.12.x is minimum requirement, use 'add_compile_definitions' add_definitions( -DHAVE_WEBKITWIDGETS ) target_link_libraries(kbibtex PRIVATE Qt5::WebKitWidgets ) else() message(STATUS "If available, using a KPart to render complex HTML content") endif() endif() install( TARGETS kbibtex ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) install( PROGRAMS org.kde.kbibtex.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) install( FILES kbibtexui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kbibtex ) install( FILES org.kde.kbibtex.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) ecm_install_icons( ICONS ${CMAKE_SOURCE_DIR}/icons/16-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/22-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/32-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/48-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/64-apps-kbibtex.png ${CMAKE_SOURCE_DIR}/icons/128-apps-kbibtex.png DESTINATION ${KDE_INSTALL_ICONDIR} ) diff --git a/src/test/kbibtextest.cpp b/src/test/kbibtextest.cpp index 0b8775ca..435d5b81 100644 --- a/src/test/kbibtextest.cpp +++ b/src/test/kbibtextest.cpp @@ -1,275 +1,274 @@ /*************************************************************************** * 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 "kbibtextest.h" #include #include #include #include #include #include #include #include #include #include #include #include -#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int filenameCounter = 0; static QColor blendColors(const QColor &color1, const QColor &color2, const qreal ratio) { const int r = color1.red() * (1 - ratio) + color2.red() * ratio; const int g = color1.green() * (1 - ratio) + color2.green() * ratio; const int b = color1.blue() * (1 - ratio) + color2.blue() * ratio; return QColor(r, g, b, 255); } class TestWidget : public QWidget { Q_OBJECT private: KBibTeXTest *m_parent; QPushButton *buttonStartTest; QProgressBar *progressBar; QAction *actionStartOnlineSearchTests; public: QListWidget *messageList; TestWidget(KBibTeXTest *parent) : QWidget(parent), m_parent(parent) { QGridLayout *layout = new QGridLayout(this); buttonStartTest = new QPushButton(QIcon::fromTheme(QStringLiteral("application-x-executable")), QStringLiteral("Start Tests"), this); layout->addWidget(buttonStartTest, 0, 0, 1, 1); progressBar = new QProgressBar(this); layout->addWidget(progressBar, 0, 1, 1, 3); progressBar->setVisible(false); messageList = new QListWidget(this); layout->addWidget(messageList, 1, 0, 4, 4); setupMenus(); } void setProgress(int pos, int total) { if (pos < 0 || total < 0) { progressBar->setVisible(false); progressBar->setMaximum(1); progressBar->setValue(0); } else { progressBar->setVisible(true); progressBar->setMaximum(total); progressBar->setValue(pos); } } void setupMenus() { QMenu *menu = new QMenu(buttonStartTest); buttonStartTest->setMenu(menu); /// ** Online Search ** actionStartOnlineSearchTests = new QAction(QStringLiteral("Online Search"), m_parent); connect(actionStartOnlineSearchTests, &QAction::triggered, m_parent, &KBibTeXTest::startOnlineSearchTests); menu->addAction(actionStartOnlineSearchTests); } void setBusy(bool isBusy) { buttonStartTest->setEnabled(!isBusy); actionStartOnlineSearchTests->setEnabled(!isBusy); } }; KBibTeXTest::KBibTeXTest(QWidget *parent) : QDialog(parent), m_running(false), m_isBusy(false) { m_onlineSearchList << new OnlineSearchAcmPortal(this); m_onlineSearchList << new OnlineSearchArXiv(this); m_onlineSearchList << new OnlineSearchBibsonomy(this); m_onlineSearchList << new OnlineSearchCERNDS(this); m_onlineSearchList << new OnlineSearchGoogleScholar(this); m_onlineSearchList << new OnlineSearchIDEASRePEc(this); m_onlineSearchList << new OnlineSearchIEEEXplore(this); m_onlineSearchList << new OnlineSearchIngentaConnect(this); m_onlineSearchList << new OnlineSearchInspireHep(this); m_onlineSearchList << new OnlineSearchJStor(this); m_onlineSearchList << new OnlineSearchMathSciNet(this); m_onlineSearchList << new OnlineSearchMRLookup(this); m_onlineSearchList << new OnlineSearchPubMed(this); m_onlineSearchList << new OnlineSearchScienceDirect(this); m_onlineSearchList << new OnlineSearchSOANASAADS(this); m_onlineSearchList << new OnlineSearchSpringerLink(this); m_onlineSearchList << new OnlineSearchBioRxiv(this); m_onlineSearchList << new OnlineSearchSemanticScholar(this); m_currentOnlineSearch = m_onlineSearchList.constBegin(); setWindowTitle(QStringLiteral("KBibTeX Test Suite")); m_testWidget = new TestWidget(this); const int fontSize = m_testWidget->fontMetrics().width(QLatin1Char('a')); m_testWidget->setMinimumSize(fontSize * 96, fontSize * 48); QBoxLayout *boxLayout = new QVBoxLayout(this); boxLayout->addWidget(m_testWidget); connect(this, &KBibTeXTest::rejected, this, &KBibTeXTest::aboutToQuit); addMessage(QString(QStringLiteral("Compiled for %1")).arg(KAboutData::applicationData().version()), statusInfo); } void KBibTeXTest::addMessage(const QString &message, const MessageStatus messageStatus) { static const QIcon iconINFO = QIcon::fromTheme(QStringLiteral("dialog-information")); static const QIcon iconOK = QIcon::fromTheme(QStringLiteral("dialog-ok-apply")); static const QIcon iconERROR = QIcon::fromTheme(QStringLiteral("dialog-cancel")); static const QIcon iconAUTH = QIcon::fromTheme(QStringLiteral("dialog-cancel")); // FIXME "dialog-cancel" should be overlay on "dialog-password" static const QIcon iconNETWORK = QIcon::fromTheme(QStringLiteral("dialog-cancel")); // FIXME "dialog-cancel" should be overlay on "network-wired" QIcon icon; switch (messageStatus) { case statusInfo: icon = iconINFO; break; case statusOk: icon = iconOK; break; case statusError: icon = iconERROR; break; case statusAuth: icon = iconAUTH; break; case statusNetwork: icon = iconNETWORK; break; } QListWidgetItem *item = icon.isNull() ? new QListWidgetItem(message) : new QListWidgetItem(icon, message); item->setToolTip(item->text()); const QColor originalBgColor = QGuiApplication::palette().color(QPalette::Base); switch (messageStatus) { case statusInfo: break; ///< nothing to do case statusOk: item->setBackgroundColor(blendColors(originalBgColor, Qt::green, .1)); break; case statusError: item->setBackgroundColor(blendColors(originalBgColor, Qt::red, .1)); break; case statusAuth: item->setBackgroundColor(blendColors(originalBgColor, Qt::yellow, .1)); break; case statusNetwork: item->setBackgroundColor(blendColors(originalBgColor, Qt::yellow, .1)); break; } m_testWidget->messageList->addItem(item); m_testWidget->messageList->scrollToBottom(); qApp->processEvents(); } void KBibTeXTest::setBusy(bool isBusy) { m_testWidget->setBusy(isBusy); if (isBusy && !m_isBusy) { /// changing to busy state QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); } else if (!isBusy && m_isBusy) { /// changing to idle state QApplication::restoreOverrideCursor(); } m_isBusy = isBusy; } void KBibTeXTest::aboutToQuit() { m_running = false; QTimer::singleShot(500, qApp, &QApplication::quit); } void KBibTeXTest::startOnlineSearchTests() { m_running = true; setBusy(true); m_testWidget->messageList->clear(); qApp->processEvents(); processNextSearch(); } void KBibTeXTest::onlineSearchStoppedSearch(int searchResult) { if (searchResult == OnlineSearchAbstract::resultNoError) { if (m_currentOnlineSearchNumFoundEntries == 0) addMessage(QString(QStringLiteral("Got no error message searching '%1', but found NO entries")).arg((*m_currentOnlineSearch)->label()), statusError); else addMessage(QString(QStringLiteral("No error searching '%1', found %2 entries")).arg((*m_currentOnlineSearch)->label()).arg(m_currentOnlineSearchNumFoundEntries), statusOk); } else if (searchResult == OnlineSearchAbstract::resultAuthorizationRequired) { addMessage(QString(QStringLiteral("Authorization required for '%1'")).arg((*m_currentOnlineSearch)->label()), statusAuth); } else if (searchResult == OnlineSearchAbstract::resultNetworkError) { addMessage(QString(QStringLiteral("Network error for '%1'")).arg((*m_currentOnlineSearch)->label()), statusNetwork); } else { addMessage(QString(QStringLiteral("Error searching '%1'")).arg((*m_currentOnlineSearch)->label()), statusError); } m_currentOnlineSearch++; progress(-1, -1); processNextSearch(); } void KBibTeXTest::onlineSearchFoundEntry() { ++m_currentOnlineSearchNumFoundEntries; } void KBibTeXTest::progress(int pos, int total) { m_testWidget->setProgress(pos, total); } void KBibTeXTest::resetProgress() { m_testWidget->setProgress(-1, -1); } void KBibTeXTest::processNextSearch() { if (m_running && m_currentOnlineSearch != m_onlineSearchList.constEnd()) { setBusy(true); m_currentOnlineSearchNumFoundEntries = 0; addMessage(QString(QStringLiteral("Searching '%1'")).arg((*m_currentOnlineSearch)->label()), statusInfo); QMap query; query.insert(OnlineSearchAbstract::queryKeyAuthor, QStringLiteral("smith")); connect(*m_currentOnlineSearch, &OnlineSearchAbstract::stoppedSearch, this, &KBibTeXTest::onlineSearchStoppedSearch); connect(*m_currentOnlineSearch, &OnlineSearchAbstract::foundEntry, this, &KBibTeXTest::onlineSearchFoundEntry); connect(*m_currentOnlineSearch, &OnlineSearchAbstract::progress, this, &KBibTeXTest::progress); (*m_currentOnlineSearch)->startSearch(query, 3); } else { addMessage(QStringLiteral("Done testing"), statusInfo); setBusy(false); m_running = false; QTimer::singleShot(500, this, &KBibTeXTest::resetProgress); } } #include "kbibtextest.moc"