Skip to content

Commit af1d156

Browse files
Updated unit test
Added solution for QCA Windows build
1 parent 83cf851 commit af1d156

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

app/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,11 @@ endif ()
510510
find_library(
511511
QCA_OSSL_PLUGIN_LIB
512512
NAMES qca-ossl
513-
PATH_SUFFIXES lib/Qca/crypto
513+
qca-ossld
514+
qca-ossl2
515+
qca-ossl-qt5
516+
PATH_SUFFIXES lib/Qca/crypto plugins/crypto crypto
517+
HINTS ${QT_PLUGIN_PATH} $ENV{OSGEO4W_ROOT}/apps/Qt5/plugins
514518
)
515519

516520
if (QCA_OSSL_PLUGIN_LIB)

app/test/testactiveproject.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void TestActiveProject::testLoadingAuthFileFromConfiguration()
199199
ActiveProject activeProject( appSettings, activeLayer, mApi->localProjectsManager() );
200200
QString projectDir = TestUtils::testDataDir() + QStringLiteral( "/project_auth_file/" );
201201
QString projectName = QStringLiteral( "auth-test.qgz" );
202-
QString af = QDir( projectDir ).filePath( AUTH_CONFIG_FILENAME );
202+
QString authFile = QDir( projectDir ).filePath( AUTH_CONFIG_FILENAME );
203203

204204
QgsApplication::initQgis();
205205

@@ -215,14 +215,15 @@ void TestActiveProject::testLoadingAuthFileFromConfiguration()
215215
QCOMPARE( count, 0 );
216216

217217
authManager->removeAllAuthenticationConfigs();
218-
QFileInfo cfgFile( af );
219-
if ( cfgFile.exists() && cfgFile.isFile() )
218+
QFileInfo cfgFileInfo( authFile );
219+
if ( cfgFileInfo.exists() && cfgFileInfo.isFile() )
220220
{
221221
// we still check that the configuration can be imported
222-
bool ok = authManager->importAuthenticationConfigsFromXml( af, AUTH_CONFIG_PASSWORD, true );
222+
bool ok = authManager->importAuthenticationConfigsFromXml( authFile, AUTH_CONFIG_PASSWORD, true );
223223

224-
QVERIFY2( ok, "Importing the authentication database from XML failed" );
224+
QCOMPARE( ok, true );
225225
count = authManager->configIds().count();
226226
QCOMPARE( count, 1 );
227227
}
228228
}
229+

0 commit comments

Comments
 (0)