mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 11:22:58 +00:00
make qt_error_string() argument non-optional
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
a53986b0c2
commit
85077cc320
3 changed files with 2 additions and 5 deletions
|
@ -1368,9 +1368,6 @@ static QtMsgHandler handler = 0; // pointer to debug handler
|
||||||
|
|
||||||
QString qt_error_string(int errorCode)
|
QString qt_error_string(int errorCode)
|
||||||
{
|
{
|
||||||
if (Q_UNLIKELY(errorCode == -1))
|
|
||||||
errorCode = errno;
|
|
||||||
|
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case EACCES:
|
case EACCES:
|
||||||
return QString::fromLatin1(QT_TRANSLATE_NOOP("QIODevice", "Permission denied"));
|
return QString::fromLatin1(QT_TRANSLATE_NOOP("QIODevice", "Permission denied"));
|
||||||
|
|
|
@ -641,7 +641,7 @@ Q_CORE_EXPORT void qWarning(const char *, ...) /* print warning message */
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
Q_CORE_EXPORT QString qt_error_string(int errorCode = -1);
|
Q_CORE_EXPORT QString qt_error_string(int errorCode);
|
||||||
Q_CORE_EXPORT void qCritical(const char *, ...) /* print critical message */
|
Q_CORE_EXPORT void qCritical(const char *, ...) /* print critical message */
|
||||||
#if (defined(Q_CC_GNU) || defined(Q_CC_CLANG)) && !defined(__INSURE__)
|
#if (defined(Q_CC_GNU) || defined(Q_CC_CLANG)) && !defined(__INSURE__)
|
||||||
__attribute__ ((format (printf, 1, 2)))
|
__attribute__ ((format (printf, 1, 2)))
|
||||||
|
|
|
@ -825,7 +825,7 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxSize)
|
||||||
if (!d->hasSetSocketError) {
|
if (!d->hasSetSocketError) {
|
||||||
d->hasSetSocketError = true;
|
d->hasSetSocketError = true;
|
||||||
d->socketError = QAbstractSocket::NetworkError;
|
d->socketError = QAbstractSocket::NetworkError;
|
||||||
d->socketErrorString = qt_error_string();
|
d->socketErrorString = qt_error_string(errno);
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue