QtBase: combine adjacent qDebug()/qCritical() lines
For qDebug() and qWarning(), this is just an optimization. For qCritical(), which can be fatal, the old code was just wrong. Change-Id: I6d8ab1d7531d766cd41b49569dc0fd4420ecab8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
40a8302115
commit
678a4273a3
@ -568,9 +568,9 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
|
||||
mimeFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("mime/") + file); // pre-1.3
|
||||
}
|
||||
if (mimeFiles.isEmpty()) {
|
||||
qWarning() << "No file found for" << file << ", even though update-mime-info said it would exist.";
|
||||
qWarning() << "Either it was just removed, or the directory doesn't have executable permission...";
|
||||
qWarning() << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory);
|
||||
qWarning() << "No file found for" << file << ", even though update-mime-info said it would exist.\n"
|
||||
"Either it was just removed, or the directory doesn't have executable permission..."
|
||||
<< QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -164,8 +164,8 @@ void QFactoryLoader::update()
|
||||
library = QLibraryPrivate::findOrCreate(QFileInfo(fileName).canonicalFilePath());
|
||||
if (!library->isPlugin()) {
|
||||
if (qt_debug_component()) {
|
||||
qDebug() << library->errorString;
|
||||
qDebug() << " not a plugin";
|
||||
qDebug() << library->errorString << endl
|
||||
<< " not a plugin";
|
||||
}
|
||||
library->release();
|
||||
continue;
|
||||
|
@ -69,39 +69,39 @@ QWindowsSockInit2::~QWindowsSockInit2()
|
||||
#ifdef BEARER_MANAGEMENT_DEBUG
|
||||
static void printBlob(NLA_BLOB *blob)
|
||||
{
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====";
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====" << endl
|
||||
|
||||
qDebug() << "type:" << blob->header.type;
|
||||
qDebug() << "size:" << blob->header.dwSize;
|
||||
qDebug() << "next offset:" << blob->header.nextOffset;
|
||||
<< "type:" << blob->header.type << endl
|
||||
<< "size:" << blob->header.dwSize << endl
|
||||
<< "next offset:" << blob->header.nextOffset;
|
||||
|
||||
switch (blob->header.type) {
|
||||
case NLA_RAW_DATA:
|
||||
qDebug() << "Raw Data";
|
||||
qDebug() << '\t' << blob->data.rawData;
|
||||
qDebug() << "Raw Data" << endl
|
||||
<< '\t' << blob->data.rawData;
|
||||
break;
|
||||
case NLA_INTERFACE:
|
||||
qDebug() << "Interface";
|
||||
qDebug() << "\ttype:" << blob->data.interfaceData.dwType;
|
||||
qDebug() << "\tspeed:" << blob->data.interfaceData.dwSpeed;
|
||||
qDebug() << "\tadapter:" << blob->data.interfaceData.adapterName;
|
||||
qDebug() << "Interface" << endl
|
||||
<< "\ttype:" << blob->data.interfaceData.dwType << endl
|
||||
<< "\tspeed:" << blob->data.interfaceData.dwSpeed << endl
|
||||
<< "\tadapter:" << blob->data.interfaceData.adapterName;
|
||||
break;
|
||||
case NLA_802_1X_LOCATION:
|
||||
qDebug() << "802.1x Location";
|
||||
qDebug() << '\t' << blob->data.locationData.information;
|
||||
qDebug() << "802.1x Location" << endl
|
||||
<< '\t' << blob->data.locationData.information;
|
||||
break;
|
||||
case NLA_CONNECTIVITY:
|
||||
qDebug() << "Connectivity";
|
||||
qDebug() << "\ttype:" << blob->data.connectivity.type;
|
||||
qDebug() << "\tinternet:" << blob->data.connectivity.internet;
|
||||
qDebug() << "Connectivity" << endl
|
||||
<< "\ttype:" << blob->data.connectivity.type << endl
|
||||
<< "\tinternet:" << blob->data.connectivity.internet;
|
||||
break;
|
||||
case NLA_ICS:
|
||||
qDebug() << "ICS";
|
||||
qDebug() << "\tspeed:" << blob->data.ICS.remote.speed;
|
||||
qDebug() << "\ttype:" << blob->data.ICS.remote.type;
|
||||
qDebug() << "\tstate:" << blob->data.ICS.remote.state;
|
||||
qDebug() << "\tmachine name:" << blob->data.ICS.remote.machineName;
|
||||
qDebug() << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
|
||||
qDebug() << "ICS" << endl
|
||||
<< "\tspeed:" << blob->data.ICS.remote.speed << endl
|
||||
<< "\ttype:" << blob->data.ICS.remote.type << endl
|
||||
<< "\tstate:" << blob->data.ICS.remote.state << endl
|
||||
<< "\tmachine name:" << blob->data.ICS.remote.machineName << endl
|
||||
<< "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
|
||||
break;
|
||||
default:
|
||||
qDebug() << "UNKNOWN BLOB TYPE";
|
||||
|
@ -498,8 +498,8 @@ static jboolean startQtApplication(JNIEnv *env, jobject /*object*/, jstring para
|
||||
}
|
||||
|
||||
if (!m_main) {
|
||||
qCritical() << "dlsym failed:" << dlerror();
|
||||
qCritical() << "Could not find main method";
|
||||
qCritical() << "dlsym failed:" << dlerror() << endl
|
||||
<< "Could not find main method";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,7 @@ QDebug operator<<(QDebug str, const QSpanCollection::Span &span)
|
||||
void QSpanCollection::updateInsertedRows(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end;
|
||||
qDebug() << index;
|
||||
qDebug() << start << end << endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -250,8 +249,7 @@ void QSpanCollection::updateInsertedRows(int start, int end)
|
||||
void QSpanCollection::updateInsertedColumns(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end;
|
||||
qDebug() << index;
|
||||
qDebug() << start << end << endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -332,8 +330,7 @@ bool QSpanCollection::cleanSpanSubIndex(QSpanCollection::SubIndex &subindex, int
|
||||
void QSpanCollection::updateRemovedRows(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end;
|
||||
qDebug() << index;
|
||||
qDebug() << start << end << endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -460,8 +457,7 @@ void QSpanCollection::updateRemovedRows(int start, int end)
|
||||
void QSpanCollection::updateRemovedColumns(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end;
|
||||
qDebug() << index;
|
||||
qDebug() << start << end << endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
|
@ -1870,8 +1870,8 @@ void QScrollerPrivate::setContentPositionHelperScrolling()
|
||||
newPos.setY(nextSegmentPosition(ySegments, now, newPos.y()));
|
||||
|
||||
// -- set the position and handle overshoot
|
||||
qScrollerDebug() << "QScroller::setContentPositionHelperScrolling()";
|
||||
qScrollerDebug() << " --> overshoot:" << overshootPosition << "- new pos:" << newPos;
|
||||
qScrollerDebug() << "QScroller::setContentPositionHelperScrolling()\n"
|
||||
" --> overshoot:" << overshootPosition << "- new pos:" << newPos;
|
||||
|
||||
QPointF newClampedPos = clampToRect(newPos, contentPosRange);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user