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 bytes = m_tcp_socket->write(message.toAscii());
|
||||
qint64 bytes = m_tcp_socket->write(message.toLatin1());
|
||||
if (bytes < 0 || bytes != message_size)
|
||||
{
|
||||
bWarning(m_context) << "Error writing to socket!";
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
//! file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||
|
||||
#include <QtGui>
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
|
||||
#include "blackmisc/context.h"
|
||||
#include "blackmisc/debug.h"
|
||||
@@ -15,7 +17,6 @@
|
||||
#include "blackd.h"
|
||||
#include "ui_blackd.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace FSD;
|
||||
|
||||
|
||||
@@ -43,7 +44,7 @@ BlackD::BlackD(QWidget *parent) :
|
||||
|
||||
createComServer();
|
||||
|
||||
m_fsd_client = new CFSDClient(IContext::getInstance());
|
||||
m_fsd_client = new CFSDClient(BlackMisc::IContext::getInstance());
|
||||
|
||||
bAppDebug << "BlackDaemon running...";
|
||||
}
|
||||
@@ -129,8 +130,8 @@ void BlackD::createLogging()
|
||||
|
||||
void BlackD::createComServer()
|
||||
{
|
||||
CMessageFactory::getInstance().registerMessages();
|
||||
m_comserver = new CComServer(IContext::getInstance(), this);
|
||||
BlackMisc::CMessageFactory::getInstance().registerMessages();
|
||||
m_comserver = new BlackMisc::CComServer(BlackMisc::IContext::getInstance(), this);
|
||||
|
||||
registerMessageFunction(this, &BlackD::onMSG_CONNECT_TO_VATSIM);
|
||||
|
||||
@@ -149,8 +150,8 @@ void BlackD::onData(QString &messageID, QByteArray &message)
|
||||
Q_ASSERT(test);
|
||||
*test << stream;
|
||||
|
||||
CMessageDispatcher::getInstance().append(test);
|
||||
CMessageDispatcher::getInstance().dispatch();
|
||||
BlackMisc::CMessageDispatcher::getInstance().append(test);
|
||||
BlackMisc::CMessageDispatcher::getInstance().dispatch();
|
||||
}
|
||||
|
||||
void BlackD::onMSG_CONNECT_TO_VATSIM(const BlackMisc::MSG_CONNECT_TO_VATSIM *connect)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "blackd.h"
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QtGui>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "blackmisc/debug.h"
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace BlackMisc
|
||||
inline CLogMessage &maybeSpace() { if (logStream->needSpace) logStream->output << ' '; return *this; }
|
||||
|
||||
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<<(char 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(); }
|
||||
inline CLogMessage &operator<<(float 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 QByteArray &t) { logStream->output << '\"' << t << '\"'; return maybeSpace(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user