summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-09 18:43:05 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-13 05:55:46 +0000
commit8cba096c2aa181b93887fa6f6086dee689dbf5ca (patch)
tree911a18b3f9625aecc79e46e33dbf7d15d6f08f07 /examples/network
parentd493f676a38f000dd9c22dee6eea2b5ae4291e0a (diff)
QtBase: compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00
Replace deprecated functions to be able to compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: If6b8de31f526320d6a0e2a20bb5f8e26c77f2353 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/securesocketclient/sslclient.cpp3
-rw-r--r--examples/network/torrent/mainwindow.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index afeec033ff..79ed7746d6 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -206,7 +206,8 @@ void SslClient::setupUi()
padLock->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored);
QHBoxLayout *layout = new QHBoxLayout(form->hostNameEdit);
- layout->setMargin(form->hostNameEdit->style()->pixelMetric(QStyle::PM_DefaultFrameWidth));
+ const int margin = form->hostNameEdit->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
+ layout->setContentsMargins(margin, margin, margin, margin);
layout->setSpacing(0);
layout->addStretch();
layout->addWidget(padLock);
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 39b166101d..704012ef6d 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -630,7 +630,7 @@ void MainWindow::about()
QPushButton *quitButton = new QPushButton("OK");
QHBoxLayout *topLayout = new QHBoxLayout;
- topLayout->setMargin(10);
+ topLayout->setContentsMargins(10, 10, 10, 10);
topLayout->setSpacing(10);
topLayout->addWidget(icon);
topLayout->addWidget(text);