mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
- Fixed: toAscii() and fromAscii() Methods are deprecated
- Fixed: Namespace conflict with IContext in blackd.cpp - Fixed: Missing include of QMessageBox, QMenu - Fixed: QBool was removed in Qt5 - Fixed: Missing include QDataStream in basestreamstringifier.h
This commit is contained in:
@@ -129,7 +129,7 @@ namespace FSD
|
|||||||
|
|
||||||
qint64 message_size = message.size();
|
qint64 message_size = message.size();
|
||||||
|
|
||||||
qint64 bytes = m_tcp_socket->write(message.toAscii());
|
qint64 bytes = m_tcp_socket->write(message.toLatin1());
|
||||||
if (bytes < 0 || bytes != message_size)
|
if (bytes < 0 || bytes != message_size)
|
||||||
{
|
{
|
||||||
bWarning(m_context) << "Error writing to socket!";
|
bWarning(m_context) << "Error writing to socket!";
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
//! file, You can obtain one at http://mozilla.org/MPL/2.0/
|
//! file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
#include "blackmisc/context.h"
|
#include "blackmisc/context.h"
|
||||||
#include "blackmisc/debug.h"
|
#include "blackmisc/debug.h"
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
#include "blackd.h"
|
#include "blackd.h"
|
||||||
#include "ui_blackd.h"
|
#include "ui_blackd.h"
|
||||||
|
|
||||||
using namespace BlackMisc;
|
|
||||||
using namespace FSD;
|
using namespace FSD;
|
||||||
|
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ BlackD::BlackD(QWidget *parent) :
|
|||||||
|
|
||||||
createComServer();
|
createComServer();
|
||||||
|
|
||||||
m_fsd_client = new CFSDClient(IContext::getInstance());
|
m_fsd_client = new CFSDClient(BlackMisc::IContext::getInstance());
|
||||||
|
|
||||||
bAppDebug << "BlackDaemon running...";
|
bAppDebug << "BlackDaemon running...";
|
||||||
}
|
}
|
||||||
@@ -129,8 +130,8 @@ void BlackD::createLogging()
|
|||||||
|
|
||||||
void BlackD::createComServer()
|
void BlackD::createComServer()
|
||||||
{
|
{
|
||||||
CMessageFactory::getInstance().registerMessages();
|
BlackMisc::CMessageFactory::getInstance().registerMessages();
|
||||||
m_comserver = new CComServer(IContext::getInstance(), this);
|
m_comserver = new BlackMisc::CComServer(BlackMisc::IContext::getInstance(), this);
|
||||||
|
|
||||||
registerMessageFunction(this, &BlackD::onMSG_CONNECT_TO_VATSIM);
|
registerMessageFunction(this, &BlackD::onMSG_CONNECT_TO_VATSIM);
|
||||||
|
|
||||||
@@ -149,8 +150,8 @@ void BlackD::onData(QString &messageID, QByteArray &message)
|
|||||||
Q_ASSERT(test);
|
Q_ASSERT(test);
|
||||||
*test << stream;
|
*test << stream;
|
||||||
|
|
||||||
CMessageDispatcher::getInstance().append(test);
|
BlackMisc::CMessageDispatcher::getInstance().append(test);
|
||||||
CMessageDispatcher::getInstance().dispatch();
|
BlackMisc::CMessageDispatcher::getInstance().dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlackD::onMSG_CONNECT_TO_VATSIM(const BlackMisc::MSG_CONNECT_TO_VATSIM *connect)
|
void BlackD::onMSG_CONNECT_TO_VATSIM(const BlackMisc::MSG_CONNECT_TO_VATSIM *connect)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "blackd.h"
|
#include "blackd.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "blackmisc/debug.h"
|
#include "blackmisc/debug.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QDataStream>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ namespace BlackMisc
|
|||||||
inline CLogMessage &maybeSpace() { if (logStream->needSpace) logStream->output << ' '; return *this; }
|
inline CLogMessage &maybeSpace() { if (logStream->needSpace) logStream->output << ' '; return *this; }
|
||||||
|
|
||||||
inline CLogMessage &operator<<(QChar t) { logStream->output << '\'' << t << '\''; return maybeSpace(); }
|
inline CLogMessage &operator<<(QChar t) { logStream->output << '\'' << t << '\''; return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(QBool t) { logStream->output << (bool(t != 0) ? "true" : "false"); return maybeSpace(); }
|
|
||||||
inline CLogMessage &operator<<(bool t) { logStream->output << (t ? "true" : "false"); return maybeSpace(); }
|
inline CLogMessage &operator<<(bool t) { logStream->output << (t ? "true" : "false"); return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(char t) { logStream->output << t; return maybeSpace(); }
|
inline CLogMessage &operator<<(char t) { logStream->output << t; return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(signed short t) { logStream->output << t; return maybeSpace(); }
|
inline CLogMessage &operator<<(signed short t) { logStream->output << t; return maybeSpace(); }
|
||||||
@@ -61,7 +60,7 @@ namespace BlackMisc
|
|||||||
{ logStream->output << QString::number(t); return maybeSpace(); }
|
{ logStream->output << QString::number(t); return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(float t) { logStream->output << t; return maybeSpace(); }
|
inline CLogMessage &operator<<(float t) { logStream->output << t; return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(double t) { logStream->output << t; return maybeSpace(); }
|
inline CLogMessage &operator<<(double t) { logStream->output << t; return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(const char *t) { logStream->output << QString::fromAscii(t); return maybeSpace(); }
|
inline CLogMessage &operator<<(const char *t) { logStream->output << QString::fromLatin1(t); return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(const QString &t) { logStream->output << '\"' << t << '\"'; return maybeSpace(); }
|
inline CLogMessage &operator<<(const QString &t) { logStream->output << '\"' << t << '\"'; return maybeSpace(); }
|
||||||
inline CLogMessage &operator<<(const QByteArray &t) { logStream->output << '\"' << t << '\"'; return maybeSpace(); }
|
inline CLogMessage &operator<<(const QByteArray &t) { logStream->output << '\"' << t << '\"'; return maybeSpace(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user