Browse Source

Make QNetworkAccessManager available from Application

Neal Wilson 6 years ago
parent
commit
1701a9ca28
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/typica.w

+ 4
- 1
src/typica.w View File

630
 #include <QtXmlPatterns>
630
 #include <QtXmlPatterns>
631
 #include <QtWebKit>
631
 #include <QtWebKit>
632
 #include <QtSvg>
632
 #include <QtSvg>
633
+#include <QtNetwork>
633
 
634
 
634
 @ New code is being written in separate files in a long term effort to improve
635
 @ New code is being written in separate files in a long term effort to improve
635
 organization of the code. The result of this is that some additional headers
636
 organization of the code. The result of this is that some additional headers
12876
         Q_INVOKABLE QString currentTypicaUser();
12877
         Q_INVOKABLE QString currentTypicaUser();
12877
         Q_INVOKABLE bool login(const QString &user, const QString &password);
12878
         Q_INVOKABLE bool login(const QString &user, const QString &password);
12878
         Q_INVOKABLE bool autoLogin();
12879
         Q_INVOKABLE bool autoLogin();
12879
-        QScriptEngine *engine;@/
12880
+        QScriptEngine *engine;
12881
+        QNetworkAccessManager *network;@/
12880
     @[public slots@]:@/
12882
     @[public slots@]:@/
12881
 	    void setDatabaseConnected(bool status);
12883
 	    void setDatabaseConnected(bool status);
12882
 	    void setCurrentTypicaUser(const QString &user);
12884
 	    void setCurrentTypicaUser(const QString &user);
12897
 Application::Application(int &argc, char **argv) : QApplication(argc, argv),
12899
 Application::Application(int &argc, char **argv) : QApplication(argc, argv),
12898
 	connectionStatus(false), currentUser(QString())@/
12900
 	connectionStatus(false), currentUser(QString())@/
12899
 {
12901
 {
12902
+    network = new QNetworkAccessManager(this);
12900
     @<Allow use of the default QSettings constructor@>@;
12903
     @<Allow use of the default QSettings constructor@>@;
12901
     @<Load translation objects@>@;
12904
     @<Load translation objects@>@;
12902
     @<Register meta-types@>@;
12905
     @<Register meta-types@>@;

Loading…
Cancel
Save