Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DICOM tests and update ctkFileDialog to consider AA_DontUseNativeDialogs attribute #1166

Merged
merged 6 commits into from
Jan 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int ctkDICOMDemoSCUTest1(int argc, char * argv [])
{
QCoreApplication app(argc, argv);
QString peer("www.dicomserver.co.uk");
QString port("11112");
QString port("104");
QString aeTitle("MOVESCP");
QStringList parameters;
parameters << peer << port << aeTitle;
Expand Down
2 changes: 1 addition & 1 deletion Applications/ctkDICOMQuery/ctkDICOMQueryMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* ../CTK-build/bin/ctkDICOMQuery test.db FINDSCU MI2B2 mi2b2.slicer.org 11112
* or this one:
* ../CTK-build/bin/ctkDICOMQuery test.db FINDSCU DICOMSERVER dicomserver.co.uk 11112
* ../CTK-build/bin/ctkDICOMQuery test.db FINDSCU DICOMSERVER dicomserver.co.uk 104
*
* you can get a similar
* functionality with this command line:
Expand Down
2 changes: 1 addition & 1 deletion Libs/DICOM/Core/Testing/Cpp/ctkDICOMDatabaseTest2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int ctkDICOMDatabaseTest2( int argc, char * argv [] )
return EXIT_FAILURE;
}

if ( database.groupElementToTag(group, element) != tag )
if ( database.groupElementToTag(group, element) != tag.toUpper() )
{
std::cerr << "ctkDICOMDatabase: could not convert a uints to tag string" << std::endl;
return EXIT_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion Libs/DICOM/Widgets/ctkDICOMServerNodeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void ctkDICOMServerNodeWidget::readSettings()
defaultServerNode["CheckState"] = static_cast<int>(Qt::Unchecked);
defaultServerNode["AETitle"] = QString("ANYAE");
defaultServerNode["Address"] = QString("dicomserver.co.uk");
defaultServerNode["Port"] = QString("11112");
defaultServerNode["Port"] = QString("104");
defaultServerNode["CGET"] = static_cast<int>(Qt::Checked);
this->addServerNode(defaultServerNode);

Expand Down
6 changes: 6 additions & 0 deletions Libs/Widgets/ctkFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
=========================================================================*/

// QT includes
#include <QGuiApplication>
#include <QChildEvent>
#include <QDebug>
#include <QDialogButtonBox>
Expand Down Expand Up @@ -144,6 +145,11 @@ ctkFileDialog::ctkFileDialog(QWidget *parentWidget,
{
Q_D(ctkFileDialog);

if (QGuiApplication::testAttribute(Qt::AA_DontUseNativeDialogs))
{
this->setOptions(QFileDialog::DontUseNativeDialog);
}
Comment on lines +148 to +151
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


d->init();
}

Expand Down