summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-09-16 13:49:26 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-09-16 14:52:40 +0200
commit8c6755aeec312ae771ef334fc863642514db3f7c (patch)
tree3ccec405ee35690bdb7def6c0a3c42866bd9adc2 /examples
parent104debb6627d71f5540bb2c3347ce56dddc63594 (diff)
parentc40a48af997f57caa0ecfca0b247837ba5b2f89b (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
Diffstat (limited to 'examples')
-rw-r--r--examples/network/torrent/peerwireclient.cpp1
-rw-r--r--examples/network/torrent/torrentclient.cpp1
-rw-r--r--examples/opengl/pbuffers/cube.cpp2
-rw-r--r--examples/opengl/shared/qtlogo.cpp3
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp2
-rw-r--r--examples/widgets/tutorials/threads/hellothread/hellothread.cpp3
-rw-r--r--examples/widgets/tutorials/threads/hellothread/hellothread.h5
-rw-r--r--examples/widgets/tutorials/threads/hellothread/main.cpp2
8 files changed, 3 insertions, 16 deletions
diff --git a/examples/network/torrent/peerwireclient.cpp b/examples/network/torrent/peerwireclient.cpp
index 0f77ba10d3..a0be01d363 100644
--- a/examples/network/torrent/peerwireclient.cpp
+++ b/examples/network/torrent/peerwireclient.cpp
@@ -49,7 +49,6 @@ static const int ConnectTimeout = 60 * 1000;
static const int KeepAliveInterval = 30 * 1000;
static const int RateControlTimerDelay = 2000;
static const int MinimalHeaderSize = 48;
-static const int FullHeaderSize = 68;
static const char ProtocolId[] = "BitTorrent protocol";
static const char ProtocolIdSize = 19;
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
index f0f47fe884..356dc21a1f 100644
--- a/examples/network/torrent/torrentclient.cpp
+++ b/examples/network/torrent/torrentclient.cpp
@@ -64,7 +64,6 @@ static const int RateControlTimerDelay = 1000;
static const int MinimumTimeBeforeRevisit = 30;
static const int MaxUploads = 4;
static const int UploadScheduleInterval = 10000;
-static const int EndGamePieces = 5;
class TorrentPiece {
public:
diff --git a/examples/opengl/pbuffers/cube.cpp b/examples/opengl/pbuffers/cube.cpp
index ffa08780d7..dc1bb23fea 100644
--- a/examples/opengl/pbuffers/cube.cpp
+++ b/examples/opengl/pbuffers/cube.cpp
@@ -44,8 +44,6 @@
#include <QtGui/QImage>
#include <QtCore/QPropertyAnimation>
-static const qreal FACE_SIZE = 0.4;
-
static const qreal speeds[] = { 3.8f, 4.4f, 5.6f };
static const qreal amplitudes[] = { 2.0f, 2.5f, 3.0f };
diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp
index ea175234ae..608f5b3f2b 100644
--- a/examples/opengl/shared/qtlogo.cpp
+++ b/examples/opengl/shared/qtlogo.cpp
@@ -49,10 +49,7 @@
static const qreal tee_height = 0.311126;
static const qreal cross_width = 0.25;
static const qreal bar_thickness = 0.113137;
-static const qreal inside_diam = 0.20;
-static const qreal outside_diam = 0.30;
static const qreal logo_depth = 0.10;
-static const int num_divisions = 32;
//! [0]
struct Geometry
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index f3bd194c31..ee42a22d00 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -142,7 +142,7 @@ void MainWindow::showAlbumDetails(QModelIndex index)
break;
}
}
- if (!trackList->count() == 0)
+ if (trackList->count() != 0)
trackList->show();
}
diff --git a/examples/widgets/tutorials/threads/hellothread/hellothread.cpp b/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
index 4395b0cb2b..1b5088e0db 100644
--- a/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
+++ b/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
@@ -44,10 +44,7 @@
* demonstrates use of QThread, says hello in another thread and terminates
*/
-//! [1]
-// hellothread/hellothread.cpp
void HelloThread::run()
{
qDebug() << "hello from worker thread " << thread()->currentThreadId();
}
-//! [1]
diff --git a/examples/widgets/tutorials/threads/hellothread/hellothread.h b/examples/widgets/tutorials/threads/hellothread/hellothread.h
index c2d8ad73ee..281f2c6cb5 100644
--- a/examples/widgets/tutorials/threads/hellothread/hellothread.h
+++ b/examples/widgets/tutorials/threads/hellothread/hellothread.h
@@ -42,13 +42,12 @@
#define HELLOTHREAD_H
#include <QThread>
-//! [1]
-// hellothread/hellothread.h
+
class HelloThread : public QThread
{
Q_OBJECT
private:
void run();
};
-//! [1]
+
#endif // HELLOTHREAD_H
diff --git a/examples/widgets/tutorials/threads/hellothread/main.cpp b/examples/widgets/tutorials/threads/hellothread/main.cpp
index 87660f97ee..8b4b00874f 100644
--- a/examples/widgets/tutorials/threads/hellothread/main.cpp
+++ b/examples/widgets/tutorials/threads/hellothread/main.cpp
@@ -41,7 +41,6 @@
#include <QtCore>
#include "hellothread.h"
-//! [1]
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
@@ -51,4 +50,3 @@ int main(int argc, char *argv[])
thread.wait(); // do not exit before the thread is completed!
return 0;
}
-//! [1]