Commit e1d2868d0a1cb83a637da8b2274244c2e3094749
1 parent
c82d18ca
undid flawed socket code
Showing
1 changed file
with
2 additions
and
12 deletions
sdk/core/qtutils.cpp
| ... | ... | @@ -18,7 +18,6 @@ |
| 18 | 18 | #include <QDebug> |
| 19 | 19 | #ifndef BR_EMBEDDED |
| 20 | 20 | #include <QDesktopServices> |
| 21 | -#include <QLocalSocket> | |
| 22 | 21 | #endif // BR_EMBEDDED |
| 23 | 22 | #include <QFile> |
| 24 | 23 | #include <QFileInfo> |
| ... | ... | @@ -93,7 +92,7 @@ void QtUtils::readFile(const QString &file, QByteArray &data, bool uncompress) |
| 93 | 92 | |
| 94 | 93 | void QtUtils::writeFile(const QString &file, const QStringList &lines) |
| 95 | 94 | { |
| 96 | - writeFile(file, lines.join("\n")); | |
| 95 | + writeFile(file, lines.join("\n") + "\n"); | |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | void QtUtils::writeFile(const QString &file, const QString &data) |
| ... | ... | @@ -107,16 +106,7 @@ void QtUtils::writeFile(const QString &file, const QByteArray &data, int compres |
| 107 | 106 | const QByteArray contents = (compression == 0) ? data : qCompress(data, compression); |
| 108 | 107 | if (baseName == "terminal") { |
| 109 | 108 | printf("%s", qPrintable(contents)); |
| 110 | - } | |
| 111 | -#ifndef BR_EMBEDDED | |
| 112 | - else if (baseName.endsWith("socket")) { | |
| 113 | - QLocalSocket socket; | |
| 114 | - socket.connectToServer(file, QLocalSocket::WriteOnly); | |
| 115 | - socket.write(data); | |
| 116 | - socket.close(); | |
| 117 | - } | |
| 118 | -#endif // BR_EMBEDDED | |
| 119 | - else { | |
| 109 | + } else { | |
| 120 | 110 | QFile f(file); |
| 121 | 111 | touchDir(f); |
| 122 | 112 | if (!f.open(QFile::WriteOnly)) | ... | ... |