File indexing completed on 2024-07-14 04:55:01

0001 /*
0002     SPDX-FileCopyrightText: 2004 Ace Jones acejones @users.sourceforge.net
0003 
0004     This file is part of libalkimia.
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #include "alkonlinequoteprocess.h"
0010 
0011 //
0012 // Helper class to babysit the KProcess used for running the local script in that case
0013 //
0014 
0015 AlkOnlineQuoteProcess::AlkOnlineQuoteProcess()
0016 {
0017     connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(slotReceivedDataFromFilter()));
0018     connect(this, SIGNAL(finished(int,QProcess::ExitStatus)), this,
0019             SLOT(slotProcessExited(int,QProcess::ExitStatus)));
0020 }
0021 
0022 void AlkOnlineQuoteProcess::slotReceivedDataFromFilter()
0023 {
0024 //   kDebug(2) << "WebPriceQuoteProcess::slotReceivedDataFromFilter(): " << QString(data);
0025     m_string += QString(readAllStandardOutput());
0026 }
0027 
0028 void AlkOnlineQuoteProcess::slotProcessExited(int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/)
0029 {
0030 //   kDebug(2) << "WebPriceQuoteProcess::slotProcessExited()";
0031     Q_EMIT processExited(m_string);
0032     m_string.truncate(0);
0033 }