Skip to content

Commit 7f0ea6c

Browse files
committed
Removed ASSERT statements
The Q_ASSERT wrappers around file open statements were copied directly from sampled code (SO?), which remove the file open statement in a release build.
1 parent ab48efc commit 7f0ea6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
6666
if (caFile.exists()) {
6767
// test CA
6868
qDebug() << "found CA certificate" << caFile.fileName();
69-
Q_ASSERT(caFile.open(QIODevice::ReadOnly));
69+
caFile.open(QIODevice::ReadOnly);
7070

7171
QSslCertificate ca(&caFile, QSsl::Pem);
7272
sslCaCert = ca;
@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
8484
if (certFile.exists()) {
8585
// test client cert
8686
qDebug() << "found client certificate" << certFile.fileName();
87-
Q_ASSERT(certFile.open(QIODevice::ReadOnly));
87+
certFile.open(QIODevice::ReadOnly);
8888

8989
QSslCertificate cert(&certFile, QSsl::Pem);
9090
qDebug() << "cert file not empty" << !cert.isNull();
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
9393
if (keyFile.exists()) {
9494
// test client key
9595
qDebug() << "found client key" << keyFile.fileName();
96-
Q_ASSERT(keyFile.open(QIODevice::ReadOnly));
96+
keyFile.open(QIODevice::ReadOnly);
9797
const QSslKey key(&keyFile, QSsl::Rsa);
9898
sslClientKey = key;
9999

0 commit comments

Comments
 (0)