Skip to content

Commit

Permalink
Modify qrencode in msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Aug 7, 2017
1 parent a561891 commit c4d1e92
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 29 deletions.
12 changes: 11 additions & 1 deletion Plugin/ProtocolQXmpp/ClientXmpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ CClientXmpp::CClientXmpp(QObject *parent)
: CClient(parent),
m_User(NULL)
{
bool check = false;
//初始化qxmpp log
m_Client.logger()->setLoggingType(QXmppLogger::StdoutLogging);

check = connect(m_Client.logger(), SIGNAL(message(QXmppLogger::MessageType,QString)),
this, SLOT(slotMessage(QXmppLogger::MessageType,QString)));
Q_ASSERT(check);

m_Client.addExtension(&m_MucManager);
//TODO:增加文件代理的查找,如果用发现服务查找,
//则可能引起大量查询包,导制服务器忙。目前解决方案就是直接设置代理
Expand Down Expand Up @@ -171,6 +175,7 @@ int CClientXmpp::Login(const QString &szUserName,
}
else
config.setUseSASLAuthentication(true);

config.setHost(CGlobal::Instance()->GetXmppServer());
config.setPort(CGlobal::Instance()->GetXmppServerPort());
config.setDomain(CGlobal::Instance()->GetXmppDomain());
Expand Down Expand Up @@ -673,3 +678,8 @@ void CClientXmpp::slotFileReceived(QXmppTransferJob *job)
QSharedPointer<CFileTransfer> file(new CFileTransferQXmpp(job));
emit sigFileReceived(QXmppUtils::jidToBareJid(job->jid()), file);
}

void CClientXmpp::slotMessage(QXmppLogger::MessageType type, const QString &text)
{
LOG_MODEL_DEBUG("qxmpp", "%s", text.toStdString().c_str());
}
4 changes: 3 additions & 1 deletion Plugin/ProtocolQXmpp/ClientXmpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ private slots:
* @param job
*/
void slotFileReceived(QXmppTransferJob *job);

//qxmpp log
void slotMessage(QXmppLogger::MessageType type, const QString &text);

private:
QXmppClient m_Client;
QSharedPointer<CManageUserQXmpp> m_User;
Expand Down
2 changes: 1 addition & 1 deletion ThirdLibrary
27 changes: 1 addition & 26 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@
version: '0.1.1.{build}'

environment:
matrix:

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015"
TOOLCHAIN_VERSION: 14
QT_VERSION: qt5.9
QT_ROOT: /C/Qt/5.9/msvc2015
AUTOBUILD_ARCH: x86
RABBIT_BUILD_THIRDLIBRARY: rabbitim
DOWNLOAD_FILE: https://sourceforge.net/projects/rabbitthirdlibrary/files/rabbit_windows_msvc14_x86_qt5.9.tar.gz/download
RABBITIM_USE_REPOSITORIES: "FALSE"
PASSWORD:
secure: 2WEtOQrdty3V3g0aEVvS3Q==

matrix:
- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015"
TOOLCHAIN_VERSION: 14
Expand All @@ -38,18 +25,6 @@ environment:
DOWNLOAD_FILE: https://sourceforge.net/projects/rabbitthirdlibrary/files/rabbit_windows_msvc14_x86_qt5.7.tar.gz/download
PASSWORD:
secure: 2WEtOQrdty3V3g0aEVvS3Q==

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 12 2013"
TOOLCHAIN_VERSION: 12
QT_VERSION: qt5.9
QT_ROOT: /C/Qt/5.9/msvc2013
AUTOBUILD_ARCH: x86
RABBIT_BUILD_THIRDLIBRARY: rabbitim
DOWNLOAD_FILE: https://sourceforge.net/projects/rabbitthirdlibrary/files/rabbit_windows_msvc12_x86_qt5.9.tar.gz/download
RABBITIM_USE_REPOSITORIES: "FALSE"
PASSWORD:
secure: 2WEtOQrdty3V3g0aEVvS3Q==

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 12 2013"
Expand Down
3 changes: 3 additions & 0 deletions pri/ThirdLibrary.pri
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ equals(QXMPP_USE_VPX, 1) {
myPackagesExist(libqrencode) {
DEFINES *= RABBITIM_USE_LIBQRENCODE
MYPKGCONFIG *= libqrencode
} else : msvc {
DEFINES *= RABBITIM_USE_LIBQRENCODE
LIBS += -lqrencode
}

myPackagesExist(QZXing) {
Expand Down

0 comments on commit c4d1e92

Please sign in to comment.