Skip to content

Commit

Permalink
Merge pull request #30 from keepassxreboot/develop
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
libf-de authored Dec 12, 2023
2 parents 80faee2 + c5e9d35 commit a56a2a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/UrlTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#include "UrlTools.h"
#ifdef WITH_XC_NETWORKING
#if defined(WITH_XC_NETWORKING) || defined(WITH_XC_BROWSER)
#include <QHostAddress>
#include <QNetworkCookie>
#include <QNetworkCookieJar>
Expand All @@ -40,7 +40,7 @@ QUrl UrlTools::convertVariantToUrl(const QVariant& var) const
return url;
}

#ifdef WITH_XC_NETWORKING
#if defined(WITH_XC_NETWORKING) || defined(WITH_XC_BROWSER)
QUrl UrlTools::getRedirectTarget(QNetworkReply* reply) const
{
QVariant var = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
Expand Down
2 changes: 1 addition & 1 deletion src/core/UrlTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class UrlTools : public QObject
explicit UrlTools() = default;
static UrlTools* instance();

#ifdef WITH_XC_NETWORKING
#if defined(WITH_XC_NETWORKING) || defined(WITH_XC_BROWSER)
QUrl getRedirectTarget(QNetworkReply* reply) const;
QString getBaseDomainFromUrl(const QString& url) const;
QString getTopLevelDomainFromUrl(const QString& url) const;
Expand Down
6 changes: 4 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ if(WITH_XC_NETWORKING)
LIBS ${TEST_LIBRARIES})

add_unit_test(NAME testicondownloader SOURCES TestIconDownloader.cpp LIBS ${TEST_LIBRARIES})

add_unit_test(NAME testurltools SOURCES TestUrlTools.cpp LIBS ${TEST_LIBRARIES})
endif()

if(WITH_XC_AUTOTYPE)
Expand Down Expand Up @@ -246,6 +244,10 @@ if(WITH_XC_BROWSER)
endif()
endif()

if(WITH_XC_NETWORKING OR WITH_XC_BROWSER)
add_unit_test(NAME testurltools SOURCES TestUrlTools.cpp LIBS ${TEST_LIBRARIES})
endif()

add_unit_test(NAME testcli SOURCES TestCli.cpp
LIBS testsupport cli ${TEST_LIBRARIES})
target_compile_definitions(testcli PRIVATE KEEPASSX_CLI_PATH="$<TARGET_FILE:keepassxc-cli>")
Expand Down

0 comments on commit a56a2a1

Please sign in to comment.