diff options
Diffstat (limited to 'examples')
18 files changed, 39 insertions, 18 deletions
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h index c6da29f..eb509d0 100644 --- a/examples/opengl/cube/mainwidget.h +++ b/examples/opengl/cube/mainwidget.h @@ -48,8 +48,10 @@ #include <QQuaternion> #include <QVector2D> +QT_BEGIN_NAMESPACE class QBasicTimer; class QGLShaderProgram; +QT_END_NAMESPACE class GeometryEngine; diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp index fde24d9..3b02c63 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp @@ -51,4 +51,4 @@ void DialogPlugin::registerTypes(const char *uri) } //FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs -Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin);
\ No newline at end of file +Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp index c675fc9..52bdfc7 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp @@ -221,4 +221,4 @@ void Directory::refresh() } m_fileList.append(file); } -}
\ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp index 44b0915..17740f2 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp @@ -54,4 +54,4 @@ void File::setName(const QString &str){ m_name = str; emit nameChanged(); } -}
\ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h b/examples/tutorials/gettingStarted/gsQml/filedialog/file.h index 21e8ebb..6aa6a6a 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/file.h @@ -64,4 +64,4 @@ class File : public QObject{ QString m_name; }; -#endif
\ No newline at end of file +#endif diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp index 24b4d77..afa26e1 100755 --- a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp +++ b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp @@ -44,17 +44,17 @@ int main(int argv, char **args) { QApplication app(argv, args); - QTextEdit textEdit; - QPushButton quitButton("&Quit"); + QTextEdit *textEdit = new QTextEdit; + QPushButton *quitButton = new QPushButton("&Quit"); - QObject::connect(&quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); + QObject::connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); - QVBoxLayout layout; - layout.addWidget(&textEdit); - layout.addWidget(&quitButton); + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(textEdit); + layout->addWidget(quitButton); QWidget window; - window.setLayout(&layout); + window.setLayout(layout); window.show(); diff --git a/examples/tutorials/modelview/4_headers/main.cpp b/examples/tutorials/modelview/4_headers/main.cpp index c89829a..8a4ab8f 100755 --- a/examples/tutorials/modelview/4_headers/main.cpp +++ b/examples/tutorials/modelview/4_headers/main.cpp @@ -50,4 +50,4 @@ int main(int argc, char *argv[]) tableView.setModel( &myModel ); tableView.show(); return a.exec(); -}
\ No newline at end of file +} diff --git a/examples/tutorials/threads/clock/clockthread.h b/examples/tutorials/threads/clock/clockthread.h index 966dbea..d77a52b 100644 --- a/examples/tutorials/threads/clock/clockthread.h +++ b/examples/tutorials/threads/clock/clockthread.h @@ -61,4 +61,4 @@ private slots: }; //! [1] -#endif // CLOCKTHREAD_H
\ No newline at end of file +#endif // CLOCKTHREAD_H diff --git a/examples/webkit/simplewebplugin/csvfactory.h b/examples/webkit/simplewebplugin/csvfactory.h index 0b046c5..0168dc2 100644 --- a/examples/webkit/simplewebplugin/csvfactory.h +++ b/examples/webkit/simplewebplugin/csvfactory.h @@ -47,6 +47,8 @@ class QNetworkAccessManager; class QNetworkReply; +QT_BEGIN_NAMESPACE + //! [plugin factory] class CSVFactory : public QWebPluginFactory { @@ -64,4 +66,6 @@ private: }; //! [plugin factory] +QT_END_NAMESPACE + #endif diff --git a/examples/webkit/simplewebplugin/csvview.h b/examples/webkit/simplewebplugin/csvview.h index 0a136f3..f457d0a 100644 --- a/examples/webkit/simplewebplugin/csvview.h +++ b/examples/webkit/simplewebplugin/csvview.h @@ -46,8 +46,10 @@ #include <QTableView> #include <QWebPluginFactory> +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE //! [definition] class CSVView : public QTableView diff --git a/examples/webkit/webftpclient/downloader.h b/examples/webkit/webftpclient/downloader.h index 8201cea..dd2f8ec 100644 --- a/examples/webkit/webftpclient/downloader.h +++ b/examples/webkit/webftpclient/downloader.h @@ -46,10 +46,12 @@ #include <QObject> #include <QUrl> +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkRequest; class QNetworkReply; class QWidget; +QT_END_NAMESPACE class Downloader : public QObject { diff --git a/examples/webkit/webftpclient/ftpreply.h b/examples/webkit/webftpclient/ftpreply.h index becd4e4..65c8c66 100644 --- a/examples/webkit/webftpclient/ftpreply.h +++ b/examples/webkit/webftpclient/ftpreply.h @@ -44,8 +44,11 @@ #include <QNetworkReply> #include <QStringList> #include <QUrlInfo> +#include <QFtp> +QT_BEGIN_NAMESPACE class QFtp; +QT_END_NAMESPACE //! [class definition] class FtpReply : public QNetworkReply diff --git a/examples/webkit/webftpclient/ftpview.h b/examples/webkit/webftpclient/ftpview.h index 2538812..ae4f9c1 100644 --- a/examples/webkit/webftpclient/ftpview.h +++ b/examples/webkit/webftpclient/ftpview.h @@ -41,7 +41,9 @@ #include <QWebView> class Downloader; +QT_BEGIN_NAMESPACE class QNetworkAccessManager; +QT_END_NAMESPACE class FtpView : public QWebView { diff --git a/examples/webkit/webplugin/csvfactory.h b/examples/webkit/webplugin/csvfactory.h index 5a44c50..d1d6b9c 100644 --- a/examples/webkit/webplugin/csvfactory.h +++ b/examples/webkit/webplugin/csvfactory.h @@ -44,8 +44,10 @@ #include <QNetworkRequest> #include <QWebPluginFactory> +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE class QWebView; class CSVFactory : public QWebPluginFactory diff --git a/examples/webkit/webplugin/csvview.h b/examples/webkit/webplugin/csvview.h index bf8918b..4cbb069 100644 --- a/examples/webkit/webplugin/csvview.h +++ b/examples/webkit/webplugin/csvview.h @@ -46,8 +46,10 @@ #include <QTableView> #include <QWebPluginFactory> +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE class QWebFrame; //! [definition] diff --git a/examples/widgets/orientation/mainwindow.h b/examples/widgets/orientation/mainwindow.h index 400a6a5..29ccf06 100644 --- a/examples/widgets/orientation/mainwindow.h +++ b/examples/widgets/orientation/mainwindow.h @@ -41,13 +41,15 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <QWidget> +#include <QAbstractButton> #include "ui_landscape.h" #include "ui_portrait.h" class QAbstractButton; +QT_BEGIN_NAMESPACE + //! [0] class MainWindow : public QWidget { @@ -70,4 +72,6 @@ private: }; //! [0] +QT_END_NAMESPACE + #endif // MAINWINDOW_H diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro index 374d9e3..1cee772 100644 --- a/examples/xml/dombookmarks/dombookmarks.pro +++ b/examples/xml/dombookmarks/dombookmarks.pro @@ -11,11 +11,9 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dombookmarks.pro *.xbel sources.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks INSTALLS += target sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - symbian: { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - addFiles.sources = frank.xbel jennifer.xbel + addFiles.files = frank.xbel jennifer.xbel addFiles.path = files DEPLOYMENT += addFiles } diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro index 0f2d55d..822a1ca 100644 --- a/examples/xml/streambookmarks/streambookmarks.pro +++ b/examples/xml/streambookmarks/streambookmarks.pro @@ -15,7 +15,7 @@ INSTALLS += target sources symbian: { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - addFiles.sources = frank.xbel jennifer.xbel + addFiles.files = frank.xbel jennifer.xbel addFiles.path = /data/qt/streambookmarks DEPLOYMENT += addFiles } |