Commit fae7c36c authored by Aard's avatar Aard

[qt5] Allow building with Qt5

parent 8794f199
......@@ -5,7 +5,7 @@ contains(MEEGO_EDITION,harmattan): {
}
TEMPLATE = app
TARGET =
TARGET = fingerterm
DEPENDPATH += .
INCLUDEPATH += .
LIBS += -lutil
......
......@@ -84,13 +84,13 @@ int main(int argc, char *argv[])
exit(0);
char *ptrs[execParts.length()+1];
for(int i=0; i<execParts.length(); i++) {
ptrs[i] = new char[execParts.at(i).toAscii().length()+1];
memcpy(ptrs[i], execParts.at(i).toAscii().data(), execParts.at(i).toAscii().length());
ptrs[i][execParts.at(i).toAscii().length()] = 0;
ptrs[i] = new char[execParts.at(i).toLatin1().length()+1];
memcpy(ptrs[i], execParts.at(i).toLatin1().data(), execParts.at(i).toLatin1().length());
ptrs[i][execParts.at(i).toLatin1().length()] = 0;
}
ptrs[execParts.length()] = 0;
execvp(execParts.first().toAscii(), ptrs);
execvp(execParts.first().toLatin1(), ptrs);
exit(0);
}
......
......@@ -78,7 +78,7 @@ PtyIFace::PtyIFace(int pid, int masterFd, Terminal *term, QString charset, QObje
fcntl(iMasterFd, F_SETFL, O_NONBLOCK); // reads from the descriptor should be non-blocking
if (!charset.isEmpty())
iTextCodec = QTextCodec::codecForName(charset.toAscii());
iTextCodec = QTextCodec::codecForName(charset.toLatin1());
if (!iTextCodec)
iTextCodec = QTextCodec::codecForName("UTF-8");
if (!iTextCodec)
......
This diff is collapsed.
......@@ -22,6 +22,7 @@
#include <QtCore>
#include <QtGui>
#include <QDBusInterface>
#include <QApplication>
#include "mainwindow.h"
#include "terminal.h"
......@@ -398,11 +399,10 @@ bool Util::charIsHexDigit(QChar ch)
{
if (ch.isDigit()) // 0-9
return true;
else if (ch.toAscii() >= 65 && ch.toAscii() <= 70) // A-F
else if (ch.toLatin1() >= 65 && ch.toLatin1() <= 70) // A-F
return true;
else if (ch.toAscii() >= 97 && ch.toAscii() <= 102) // a-f
else if (ch.toLatin1() >= 97 && ch.toLatin1() <= 102) // a-f
return true;
return false;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment