kopete/sms: Remove deprecated throw() specifiers

This fixes FTBFS when kopete is built with BUILD_KOPETE_PROTOCOL_SMS and
WITH_GSM and c++ standard >=c++17.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
pull/109/head
Alexander Golubev 7 months ago
parent 54bf664c80
commit 5558fa4e77

@ -88,7 +88,7 @@ static void stopTimer()
// KopeteUnixSerialPort members
void KopeteUnixSerialPort::throwModemException(string message) throw(GsmException)
void KopeteUnixSerialPort::throwModemException(string message)
{
ostringstream os;
os << message << " (errno: " << errno << "/" << strerror(errno) << ")";
@ -101,7 +101,7 @@ void KopeteUnixSerialPort::putBack(unsigned char c)
_oldChar = c;
}
int KopeteUnixSerialPort::readByte() throw(GsmException)
int KopeteUnixSerialPort::readByte()
{
if (_oldChar != -1)
{
@ -166,8 +166,7 @@ int KopeteUnixSerialPort::readByte() throw(GsmException)
}
KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed,
string initString, bool swHandshake)
throw(GsmException) :
string initString, bool swHandshake) :
_oldChar(-1), _timeoutVal(TIMEOUT_SECS)
{
_readNotifier = NULL;
@ -326,7 +325,7 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed,
throwModemException("reset modem failed");
}
string KopeteUnixSerialPort::getLine() throw(GsmException)
string KopeteUnixSerialPort::getLine()
{
string result;
int c;
@ -349,8 +348,7 @@ string KopeteUnixSerialPort::getLine() throw(GsmException)
return result;
}
void KopeteUnixSerialPort::putLine(string line,
bool carriageReturn) throw(GsmException)
void KopeteUnixSerialPort::putLine(string line, bool carriageReturn)
{
#ifndef NDEBUG
if (debugLevel() >= 1)
@ -418,7 +416,7 @@ void KopeteUnixSerialPort::putLine(string line,
// in order to properly handle unsolicited result codes from the ME/TA
}
bool KopeteUnixSerialPort::wait(GsmTime timeout) throw(GsmException)
bool KopeteUnixSerialPort::wait(GsmTime timeout)
{
fd_set fds;
FD_ZERO(&fds);

@ -43,23 +43,21 @@ protected:
TQSocketNotifier* _readNotifier;
// throw GsmException include UNIX errno
void throwModemException(std::string message) throw(GsmException);
void throwModemException(std::string message);
public:
// create Port given the UNIX device name
KopeteUnixSerialPort(std::string device, speed_t lineSpeed = DEFAULT_BAUD_RATE,
std::string initString = DEFAULT_INIT_STRING,
bool swHandshake = false)
throw(GsmException);
bool swHandshake = false);
virtual ~KopeteUnixSerialPort();
// inherited from Port
void putBack(unsigned char c);
int readByte() throw(GsmException);
std::string getLine() throw(GsmException);
void putLine(std::string line,
bool carriageReturn = true) throw(GsmException);
bool wait(GsmTime timeout) throw(GsmException);
int readByte();
std::string getLine();
void putLine(std::string line, bool carriageReturn = true);
bool wait(GsmTime timeout);
void setTimeOut(unsigned int timeout);
signals:

Loading…
Cancel
Save