I try to add ( QNetworkReply* ). It did not solved my problem. Request dos't send (the record of checkpoint file is empty) and replyHasFinished(QNetworkReply*) Slot has not been fired.
Now MyClass is:
{
Q_OBJECT
public:
OptiroamLogic
(QCommandLinkButton
*commandLinkButton,
QLCDNumber *lcdnumber,
QWidget *parent
= 0, Qt
::WFlags flags
= 0);
QNetworkReply *reply;
QNetworkAccessManager *manager;
private:
// QNetworkAccessManager *manager;
QCommandLinkButton *topUp;
private:
public slots:
void btnRunBrowser_clicked();
void replyHasFinished(QNetworkReply*);
void sendBalanceRequest();
void slotReadyRead();
void slotError(QNetworkReply::NetworkError);
};
}; // namespace Tel
class MyClass : public QMainWindow
{
Q_OBJECT
public:
OptiroamLogic(QCommandLinkButton *commandLinkButton,QLCDNumber *lcdnumber,QWidget *parent = 0, Qt::WFlags flags = 0);
QNetworkReply *reply;
QNetworkAccessManager *manager;
private:
// QNetworkAccessManager *manager;
QCommandLinkButton *topUp;
QLCDNumber *displayBalance;
private:
QString parseXML(QString str);
public slots:
void btnRunBrowser_clicked();
void replyHasFinished(QNetworkReply*);
void sendBalanceRequest();
void slotReadyRead();
void slotError(QNetworkReply::NetworkError);
};
}; // namespace Tel
To copy to clipboard, switch view to plain text mode
May be the reason is in preprocessor Difinitions:
In work project they are : "UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;ND EBUG;QT_CORE_LIB;QT_GUI_LIB;QT_XMLPATTERNS_LIB"
In "enemy" project was:
"WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBYQT4_EXPORTS;UNI CODE"
I try to play with them. Now:
"WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBYQT4_EXPORTS;UNI CODE;QT_CORE_LIB;QT_GUI_LIB;QT_XMLPATTERNS_LIB"
As i see there are not something "QT_NETWORK_LIB". But in "work" project it works. The head of class.h file is
#ifdef _WINDOWS
#ifdef LIBYQT4_EXPORTS
#define YQT4_API __declspec(dllexport)
#else
#ifndef LIBYQT4_STATIC
//#define YQT4_API __declspec(dllimport)
#endif
#endif
#endif /* _WINDOWS */
#ifndef YQT4_API
#define YQT4_API
#endif
#undef open
#undef read
#undef close
#undef write
#undef mkdir
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
//#define QT_NO_DEBUG
//#define QT_DLL
//#define QT_GUI_LIB
//#define QT_CORE_LIB
//#define QT_THREAD_SUPPORT
#include <QtGui>
#include <QSound>
#include <QNetworkReply>
#ifdef _WINDOWS
#ifdef LIBYQT4_EXPORTS
#define YQT4_API __declspec(dllexport)
#else
#ifndef LIBYQT4_STATIC
//#define YQT4_API __declspec(dllimport)
#endif
#endif
#endif /* _WINDOWS */
#ifndef YQT4_API
#define YQT4_API
#endif
#undef open
#undef read
#undef close
#undef write
#undef mkdir
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
//#define QT_NO_DEBUG
//#define QT_DLL
//#define QT_GUI_LIB
//#define QT_CORE_LIB
//#define QT_THREAD_SUPPORT
#include <QtGui>
#include <QSound>
#include <QNetworkReply>
To copy to clipboard, switch view to plain text mode
And in code i saw something like "one thread supply" - may be this is the reason?
I gonna try to send request throw InternetOpenUrl() and see "checkpoint" file.
Bookmarks