Skip to content
Extraits de code Groupes Projets

Klkt fix

Fusionnées Kubat a demandé de fusionner klkt-fix vers master
1 file
+ 7
6
Comparer les modifications
  • Côte à côte
  • En ligne
+ 7
6
@@ -297,8 +297,8 @@ private slots:
for (auto &line : lines) {
return_position = line.length() + 1;
m_pending_data = m_pending_data.right(m_pending_data.length() - return_position);
if (line == "OK") {
m_pending_data = m_pending_data.right(m_pending_data.length() - return_position);
if (line == "OK" || line.left(3) == "ACK") {
m_sock.close();
return;
}
@@ -328,8 +328,8 @@ private slots:
for (const auto &line : lines) {
return_position = line.length() + 1;
m_pending_data = m_pending_data.right(m_pending_data.length() - return_position);
if (line == "OK") {
m_pending_data = m_pending_data.right(m_pending_data.length() - return_position);
if (line == "OK" || line.left(3) == "ACK") {
/* Read the current song if needed */
if (m_state == "play") {
QWidget::disconnect(m_connect_read);
@@ -408,7 +408,7 @@ private:
connect(&m_sock, &Socket::readyRead, this, [&]() {
QStringList lines = QTextCodec::codecForMib(UTF8_MIB)->toUnicode(m_sock.readAll()).split("\n");
for (auto &line : lines) {
if (line == "OK") {
if (line == "OK" || line.left(3) == "ACK") {
m_sock.close();
emit finished();
return;
@@ -660,7 +660,8 @@ public:
void
restart(void) const {
sendNotification("Klkt restart", "Klkt will restart", Urgency::LOW);
QProcess::startDetached(QApplication::applicationFilePath());
QStringList args{QApplication::applicationFilePath()};
QProcess::startDetached(args[0], args);
::exit(EXIT_SUCCESS);
}
};
Chargement en cours