Working toward compiling WSJT-X under Qt5. It doesn't work, yet.

The present code is still OK in Qt 4.x.  For Qt5, must replace 
#include <QtGui> by #include <QtWidgets> in several places, and 
uncomment these lines

//#include <QtConcurrent/QtConcurrentMap>
//#include <QtConcurrent/QtConcurrentRun>

in mainwindow.cpp.  More work still to do, for Qt5!



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3309 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-23 19:35:37 +00:00
parent 73cd30dd1b
commit 3ecf743667
5 changed files with 20 additions and 16 deletions

View File

@ -411,7 +411,7 @@ void DevSetup::on_testCATButton_clicked()
msgBox("Rig init failure");
return;
}
rig->setConf("rig_pathname", m_catPort.toAscii().data());
rig->setConf("rig_pathname", m_catPort.toLatin1().data());
char buf[80];
sprintf(buf,"%d",m_serialRate);
rig->setConf("serial_speed",buf);
@ -419,7 +419,7 @@ void DevSetup::on_testCATButton_clicked()
rig->setConf("data_bits",buf);
sprintf(buf,"%d",m_stopBits);
rig->setConf("stop_bits",buf);
rig->setConf("serial_handshake",m_handshake.toAscii().data());
rig->setConf("serial_handshake",m_handshake.toLatin1().data());
if(m_bDTRoff) {
rig->setConf("rts_state","OFF");
rig->setConf("dtr_state","OFF");

View File

@ -12,7 +12,7 @@ void getfile(QString fname, int ntrperiod)
{
char name[80];
strcpy(name,fname.toAscii());
strcpy(name,fname.toLatin1());
FILE* fp=fopen(name,"rb");
int i0=fname.indexOf(".wav");
@ -53,7 +53,7 @@ void savewav(QString fname, int ntrperiod)
int npts=ntrperiod*12000;
// qint16* buf=(qint16*)malloc(2*npts);
char name[80];
strcpy(name,fname.toAscii());
strcpy(name,fname.toLatin1());
FILE* fp=fopen(name,"wb");
if(fp != NULL) {

View File

@ -1,5 +1,5 @@
#include <QtGui>
#include <QtGui/QApplication>
#include <QApplication>
#include <portaudio.h>
#include "mainwindow.h"

View File

@ -9,6 +9,8 @@
#include "getfile.h"
#include <portaudio.h>
#include "logqso.h"
//#include <QtConcurrent/QtConcurrentMap>
//#include <QtConcurrent/QtConcurrentRun>
int itone[85]; //Tx audio tones for 85 symbols
int icw[250]; //Dits for CW ID
@ -435,7 +437,7 @@ void MainWindow::readSettings()
settings.beginGroup("Common");
m_myCall=settings.value("MyCall","").toString();
morse_(m_myCall.toAscii().data(),icw,&m_ncw,m_myCall.length());
morse_(m_myCall.toLatin1().data(),icw,&m_ncw,m_myCall.length());
m_myGrid=settings.value("MyGrid","").toString();
m_idInt=settings.value("IDint",0).toInt();
m_pttMethodIndex=settings.value("PTTmethod",1).toInt();
@ -1231,7 +1233,7 @@ void MainWindow::decode() //decode()
if(m_saveSynced) m_nsave=1;
if(m_saveDecoded) m_nsave=2;
jt9com_.nsave=m_nsave;
strncpy(jt9com_.datetime, m_dateTime.toAscii(), 20);
strncpy(jt9com_.datetime, m_dateTime.toLatin1(), 20);
//newdat=1 ==> this is new data, must do the big FFT
//nagain=1 ==> decode only at fQSO +/- Tol
@ -1350,7 +1352,7 @@ void MainWindow::readFromStdout() //readFromStdout
QString msg=t.mid(34);
int i1=msg.indexOf("\r");
if(i1>0) msg=msg.mid(0,i1-1) + " ";
bool b=stdmsg_(msg.mid(0,22).toAscii().constData(),22);
bool b=stdmsg_(msg.mid(0,22).toLatin1().constData(),22);
QStringList w=msg.split(" ",QString::SkipEmptyParts);
if(b and w[0]==m_myCall) {
QString tt=w[2];
@ -1537,7 +1539,7 @@ void MainWindow::guiUpdate()
int ichk=0,itext=0;
genjt9_(message,&ichk,msgsent,itone,&itext,len1,len1);
msgsent[22]=0;
QString t=QString::fromAscii(msgsent);
QString t=QString::fromLatin1(msgsent);
if(m_tune) t="TUNE";
lab5->setText("Last Tx: " + t);
if(m_restart) {
@ -1600,7 +1602,7 @@ void MainWindow::guiUpdate()
nc1++;
}
if(nc1 == 0) {
QString t=QString::fromAscii(msgsent);
QString t=QString::fromLatin1(msgsent);
if(t==m_msgSent0) {
m_repeatMsg++;
} else {
@ -2193,7 +2195,7 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
bool text=false;
if(itext!=0) text=true;
QString t1;
t1.fromAscii(msgsent);
t1.fromLatin1(msgsent);
if(text) t1=t1.mid(0,13);
QPalette p(tx->palette());
if(text) {
@ -2272,7 +2274,7 @@ void MainWindow::on_dxGridEntry_textChanged(const QString &t) //dxGrid changed
double utch=nsec/3600.0;
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
azdist_(m_myGrid.toAscii().data(),m_hisGrid.toAscii().data(),&utch,
azdist_(m_myGrid.toLatin1().data(),m_hisGrid.toLatin1().data(),&utch,
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
QString t;
t.sprintf("Az: %d",nAz);
@ -2777,7 +2779,7 @@ void MainWindow::rigOpen()
msgBox("Rig init failure");
return;
}
rig->setConf("rig_pathname", m_catPort.toAscii().data());
rig->setConf("rig_pathname", m_catPort.toLatin1().data());
char buf[80];
sprintf(buf,"%d",m_serialRate);
rig->setConf("serial_speed",buf);
@ -2785,7 +2787,7 @@ void MainWindow::rigOpen()
rig->setConf("data_bits",buf);
sprintf(buf,"%d",m_stopBits);
rig->setConf("stop_bits",buf);
rig->setConf("serial_handshake",m_handshake.toAscii().data());
rig->setConf("serial_handshake",m_handshake.toLatin1().data());
if(m_bDTRoff) {
rig->setConf("rts_state","OFF");
rig->setConf("dtr_state","OFF");

View File

@ -5,12 +5,14 @@
#-------------------------------------------------
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += qwt thread
#CONFIG += console
TARGET = wsjtx
DESTDIR = ../wsjtx_install
VERSION = 0.95
#DESTDIR = ../qt5_install
VERSION = 0.99
TEMPLATE = app
win32 {
@ -75,6 +77,6 @@ CONFIG(release) {
LIBS += C:/qwt-6.0.1/lib/qwt.dll
} else {
LIBS += C:/qwt-6.0.1/lib/qwtd.dll
LIBS += -lusb
}
LIBS += -lusb
}