From f306fadaca1cf236ff012f38b113cbc8990b89d0 Mon Sep 17 00:00:00 2001 From: Torste Aikio Date: Fri, 21 May 2010 12:03:26 +0300 Subject: [PATCH] Debugging stuff added --- src/mainwidget.cpp | 2 +- src/settingsdlg.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index a3d8151..77a2de4 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -35,7 +35,7 @@ MainWidget::MainWidget (QWidget *parent) connect(buttons[2], SIGNAL(clicked(bool)), &irCtrl, SLOT(sendCmd2(bool))); connect(buttons[3], SIGNAL(clicked(bool)), &irCtrl, SLOT(sendCmd3(bool))); connect(buttons[4], SIGNAL(clicked(bool)), &irCtrl, SLOT(sendCmd4(bool))); - connect(buttons[5], SIGNAL(clicked(bool)), &irCtrl, SLOT(sendCmd5(bool))); + connect(buttons[5], SIGNAL(clicked()), this, SLOT(showSettingsDialog())); this->setContentsMargins(0, 0, 0, 0); layout->setContentsMargins(0, 0, 0, 0); diff --git a/src/settingsdlg.cpp b/src/settingsdlg.cpp index fa68fc1..ea5cd29 100644 --- a/src/settingsdlg.cpp +++ b/src/settingsdlg.cpp @@ -9,6 +9,7 @@ #include #include #include +#include SettingsDlg::SettingsDlg(QWidget *parent) : QDialog(parent) @@ -66,14 +67,19 @@ void SettingsDlg::alphabetItemChanged(QListWidgetItem *current, QListWidgetItem connect(netAM, SIGNAL(finished(QNetworkReply*)), this, SLOT(mfgListDownloadFinished(QNetworkReply*))); } +#include void SettingsDlg::mfgListDownloadFinished(QNetworkReply *reply) { mfgList->clear(); - QBuffer buf(reply->readAll()); - while (buf->canReadLine()) + QByteArray ba = reply->readAll(); + QBuffer buf(&ba, this); + qDebug() << buf.canReadLine(); + while (buf.canReadLine()) { - mfgList->addItem(QString(buf->readLine())); + QString str(buf.readLine()); + qDebug() << str; + mfgList->addItem(str); } reply->deleteLater(); } -- 1.7.9.5