Use qUtf8Printable.
--HG-- branch : develop
This commit is contained in:
parent
9069337a7a
commit
06a54ba40c
|
@ -250,7 +250,7 @@ void VApplication::NewValentina(const QString &fileName)
|
||||||
qCDebug(vApp, "Open new detached process.");
|
qCDebug(vApp, "Open new detached process.");
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "New process without arguments. program = %s", qApp->applicationFilePath().toUtf8().constData());
|
qCDebug(vApp, "New process without arguments. program = %s", qUtf8Printable(qApp->applicationFilePath()));
|
||||||
// Path can contain spaces.
|
// Path can contain spaces.
|
||||||
if (QProcess::startDetached("\""+qApp->applicationFilePath()+"\""))
|
if (QProcess::startDetached("\""+qApp->applicationFilePath()+"\""))
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ void VApplication::NewValentina(const QString &fileName)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QString run = QString("\"%1\" \"%2\"").arg(qApp->applicationFilePath()).arg(fileName);
|
const QString run = QString("\"%1\" \"%2\"").arg(qApp->applicationFilePath()).arg(fileName);
|
||||||
qCDebug(vApp, "New process with arguments. program = %s", run.toUtf8().constData());
|
qCDebug(vApp, "New process with arguments. program = %s", qUtf8Printable(run));
|
||||||
if (QProcess::startDetached(run))
|
if (QProcess::startDetached(run))
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "The process was started successfully.");
|
qCDebug(vApp, "The process was started successfully.");
|
||||||
|
@ -471,17 +471,17 @@ void VApplication::BeginLogging()
|
||||||
{
|
{
|
||||||
out.reset(new QTextStream(lockLog->GetProtected().get()));
|
out.reset(new QTextStream(lockLog->GetProtected().get()));
|
||||||
qInstallMessageHandler(noisyFailureMsgHandler);
|
qInstallMessageHandler(noisyFailureMsgHandler);
|
||||||
qCDebug(vApp, "Log file %s was locked.", LogPath().toUtf8().constData());
|
qCDebug(vApp, "Log file %s was locked.", qUtf8Printable(LogPath()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Error opening log file \'%s\'. All debug output redirected to console.",
|
qCDebug(vApp, "Error opening log file \'%s\'. All debug output redirected to console.",
|
||||||
LogPath().toUtf8().constData());
|
qUtf8Printable(LogPath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Failed to lock %s", LogPath().toUtf8().constData());
|
qCDebug(vApp, "Failed to lock %s", qUtf8Printable(LogPath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,16 +508,16 @@ void VApplication::ClearOldLogs() const
|
||||||
{
|
{
|
||||||
if (tmp.GetProtected()->remove())
|
if (tmp.GetProtected()->remove())
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Deleted %s", info.absoluteFilePath().toUtf8().constData());
|
qCDebug(vApp, "Deleted %s", qUtf8Printable(info.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Could not delete %s", info.absoluteFilePath().toUtf8().constData());
|
qCDebug(vApp, "Could not delete %s", qUtf8Printable(info.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Failed to lock %s", info.absoluteFilePath().toUtf8().constData());
|
qCDebug(vApp, "Failed to lock %s", qUtf8Printable(info.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -730,7 +730,7 @@ void VApplication::GatherLogs() const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vApp, "Failed to lock %s", info.absoluteFilePath().toUtf8().constData());
|
qCDebug(vApp, "Failed to lock %s", qUtf8Printable(info.absoluteFilePath())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,11 +146,11 @@ void MainWindow::NewPP()
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "New PP.");
|
qCDebug(vMainWindow, "New PP.");
|
||||||
QString patternPieceName = QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1);
|
QString patternPieceName = QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1);
|
||||||
qCDebug(vMainWindow, "Generated PP name: %s", patternPieceName.toUtf8().constData());
|
qCDebug(vMainWindow, "Generated PP name: %s", qUtf8Printable(patternPieceName));
|
||||||
|
|
||||||
qCDebug(vMainWindow, "PP count %d", comboBoxDraws->count());
|
qCDebug(vMainWindow, "PP count %d", comboBoxDraws->count());
|
||||||
patternPieceName = PatternPieceName(patternPieceName);
|
patternPieceName = PatternPieceName(patternPieceName);
|
||||||
qCDebug(vMainWindow, "PP name: %s", patternPieceName.toUtf8().constData());
|
qCDebug(vMainWindow, "PP name: %s", qUtf8Printable(patternPieceName));
|
||||||
if (patternPieceName.isEmpty())
|
if (patternPieceName.isEmpty())
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Name empty.");
|
qCDebug(vMainWindow, "Name empty.");
|
||||||
|
@ -165,7 +165,7 @@ void MainWindow::AddPP(const QString &PPName)
|
||||||
{
|
{
|
||||||
if (doc->appendPP(PPName) == false)
|
if (doc->appendPP(PPName) == false)
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Error creating pattern piece with the name %s.", PPName.toUtf8().constData());
|
qCDebug(vMainWindow, "Error creating pattern piece with the name %s.", qUtf8Printable(PPName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
comboBoxDraws->blockSignals(true);
|
comboBoxDraws->blockSignals(true);
|
||||||
|
@ -1899,11 +1899,11 @@ bool MainWindow::SaveAs()
|
||||||
|
|
||||||
if (lock->IsLocked())
|
if (lock->IsLocked())
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Pattern file %s was locked.", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Pattern file %s was locked.", qUtf8Printable(fileName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Failed to lock %s", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Failed to lock %s", qUtf8Printable(fileName));
|
||||||
qCDebug(vMainWindow, "Error type: %d", lock->GetLockError());
|
qCDebug(vMainWindow, "Error type: %d", lock->GetLockError());
|
||||||
if (lock->GetLockError() == QLockFile::LockFailedError)
|
if (lock->GetLockError() == QLockFile::LockFailedError)
|
||||||
{
|
{
|
||||||
|
@ -1972,7 +1972,7 @@ void MainWindow::Open()
|
||||||
//Absolute path to last open file
|
//Absolute path to last open file
|
||||||
dir = QFileInfo(files.first()).absolutePath();
|
dir = QFileInfo(files.first()).absolutePath();
|
||||||
}
|
}
|
||||||
qCDebug(vMainWindow, "Run QFileDialog::getOpenFileName: dir = %s.", dir.toUtf8().constData());
|
qCDebug(vMainWindow, "Run QFileDialog::getOpenFileName: dir = %s.", qUtf8Printable(dir));
|
||||||
const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), dir, filter);
|
const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), dir, filter);
|
||||||
if (filePath.isEmpty())
|
if (filePath.isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -2085,7 +2085,7 @@ void MainWindow::FileClosedCorrect()
|
||||||
{
|
{
|
||||||
autofile.remove();
|
autofile.remove();
|
||||||
}
|
}
|
||||||
qCDebug(vMainWindow, "File %s closed correct.", curFile.toUtf8().constData());
|
qCDebug(vMainWindow, "File %s closed correct.", qUtf8Printable(curFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -2359,7 +2359,7 @@ void MainWindow::New()
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "New PP.");
|
qCDebug(vMainWindow, "New PP.");
|
||||||
QString patternPieceName = QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1);
|
QString patternPieceName = QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1);
|
||||||
qCDebug(vMainWindow, "Generated PP name: %s", patternPieceName.toUtf8().constData());
|
qCDebug(vMainWindow, "Generated PP name: %s", qUtf8Printable(patternPieceName));
|
||||||
|
|
||||||
qCDebug(vMainWindow, "First PP");
|
qCDebug(vMainWindow, "First PP");
|
||||||
DialogNewPattern newPattern(pattern, patternPieceName, this);
|
DialogNewPattern newPattern(pattern, patternPieceName, this);
|
||||||
|
@ -2367,7 +2367,7 @@ void MainWindow::New()
|
||||||
{
|
{
|
||||||
patternPieceName = newPattern.name();
|
patternPieceName = newPattern.name();
|
||||||
qApp->setPatternUnit(newPattern.PatternUnit());
|
qApp->setPatternUnit(newPattern.PatternUnit());
|
||||||
qCDebug(vMainWindow, "PP name: %s", patternPieceName.toUtf8().constData());
|
qCDebug(vMainWindow, "PP name: %s", qUtf8Printable(patternPieceName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2597,7 +2597,7 @@ void MainWindow::MinimumScrollBar()
|
||||||
*/
|
*/
|
||||||
bool MainWindow::SavePattern(const QString &fileName, QString &error)
|
bool MainWindow::SavePattern(const QString &fileName, QString &error)
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Saving pattern file %s.", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Saving pattern file %s.", qUtf8Printable(fileName));
|
||||||
QFileInfo tempInfo(fileName);
|
QFileInfo tempInfo(fileName);
|
||||||
|
|
||||||
const QString mPath = doc->MPath();
|
const QString mPath = doc->MPath();
|
||||||
|
@ -2613,14 +2613,14 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error)
|
||||||
{
|
{
|
||||||
setCurrentFile(fileName);
|
setCurrentFile(fileName);
|
||||||
helpLabel->setText(tr("File saved"));
|
helpLabel->setText(tr("File saved"));
|
||||||
qCDebug(vMainWindow, "File %s saved.", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "File %s saved.", qUtf8Printable(fileName));
|
||||||
PatternWasModified(result);
|
PatternWasModified(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
doc->SetPath(mPath);
|
doc->SetPath(mPath);
|
||||||
qCDebug(vMainWindow, "Could not save file %s. %s.", fileName.toUtf8().constData(), error.toUtf8().constData());
|
qCDebug(vMainWindow, "Could not save file %s. %s.", qUtf8Printable(fileName), qUtf8Printable(error));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -2649,7 +2649,7 @@ void MainWindow::AutoSavePattern()
|
||||||
*/
|
*/
|
||||||
void MainWindow::setCurrentFile(const QString &fileName)
|
void MainWindow::setCurrentFile(const QString &fileName)
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Set current name to \"%s\"", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Set current name to \"%s\"", qUtf8Printable(fileName));
|
||||||
curFile = fileName;
|
curFile = fileName;
|
||||||
qApp->getUndoStack()->setClean();
|
qApp->getUndoStack()->setClean();
|
||||||
|
|
||||||
|
@ -3103,7 +3103,7 @@ MainWindow::~MainWindow()
|
||||||
*/
|
*/
|
||||||
bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasureFile)
|
bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasureFile)
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Loading new file %s.", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Loading new file %s.", qUtf8Printable(fileName));
|
||||||
|
|
||||||
//We have unsaved changes or load more then one file per time
|
//We have unsaved changes or load more then one file per time
|
||||||
if (OpenNewValentina(fileName))
|
if (OpenNewValentina(fileName))
|
||||||
|
@ -3123,11 +3123,11 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu
|
||||||
|
|
||||||
if (lock->IsLocked())
|
if (lock->IsLocked())
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Pattern file %s was locked.", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Pattern file %s was locked.", qUtf8Printable(fileName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Failed to lock %s", fileName.toUtf8().constData());
|
qCDebug(vMainWindow, "Failed to lock %s", qUtf8Printable(fileName));
|
||||||
qCDebug(vMainWindow, "Error type: %d", lock->GetLockError());
|
qCDebug(vMainWindow, "Error type: %d", lock->GetLockError());
|
||||||
if (lock->GetLockError() == QLockFile::LockFailedError)
|
if (lock->GetLockError() == QLockFile::LockFailedError)
|
||||||
{
|
{
|
||||||
|
@ -3342,8 +3342,8 @@ void MainWindow::ReopenFilesAfterCrash(QStringList &args)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vMainWindow, "Could not copy %s.autosave to %s %s",
|
qCDebug(vMainWindow, "Could not copy %s.autosave to %s %s",
|
||||||
restoreFiles.at(i).toUtf8().constData(), restoreFiles.at(i).toUtf8().constData(),
|
qUtf8Printable(restoreFiles.at(i)), qUtf8Printable(restoreFiles.at(i)),
|
||||||
error.toUtf8().constData());
|
qUtf8Printable(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ void VPattern::Parse(const Document &parse)
|
||||||
qCDebug(vXML, "Tag gradation.");
|
qCDebug(vXML, "Tag gradation.");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qCDebug(vXML, "Wrong tag name %s", domElement.tagName().toUtf8().constData());
|
qCDebug(vXML, "Wrong tag name %s", qUtf8Printable(domElement.tagName()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ void VPattern::setCurrentData()
|
||||||
if (CountPP() > 1)//don't need upadate data if we have only one pattern piece
|
if (CountPP() > 1)//don't need upadate data if we have only one pattern piece
|
||||||
{
|
{
|
||||||
qCDebug(vXML, "Setting current data");
|
qCDebug(vXML, "Setting current data");
|
||||||
qCDebug(vXML, "Current PP name %s", nameActivPP.toUtf8().constData());
|
qCDebug(vXML, "Current PP name %s", qUtf8Printable(nameActivPP));
|
||||||
qCDebug(vXML, "PP count %d", CountPP());
|
qCDebug(vXML, "PP count %d", CountPP());
|
||||||
|
|
||||||
quint32 id = 0;
|
quint32 id = 0;
|
||||||
|
@ -218,11 +218,11 @@ void VPattern::setCurrentData()
|
||||||
if (id == NULL_ID)
|
if (id == NULL_ID)
|
||||||
{
|
{
|
||||||
qCDebug(vXML, "Could not find record for this current pattern piece %s",
|
qCDebug(vXML, "Could not find record for this current pattern piece %s",
|
||||||
nameActivPP.toUtf8().constData());
|
qUtf8Printable(nameActivPP));
|
||||||
|
|
||||||
const VToolRecord tool = history.at(history.size()-1);
|
const VToolRecord tool = history.at(history.size()-1);
|
||||||
id = tool.getId();
|
id = tool.getId();
|
||||||
qCDebug(vXML, "Taking record with id %u from PP %s", id, tool.getNameDraw().toUtf8().constData());
|
qCDebug(vXML, "Taking record with id %u from PP %s", id, qUtf8Printable(tool.getNameDraw()));
|
||||||
if (id == NULL_ID)
|
if (id == NULL_ID)
|
||||||
{
|
{
|
||||||
qCDebug(vXML, "Bad id for last record in history.");
|
qCDebug(vXML, "Bad id for last record in history.");
|
||||||
|
@ -394,7 +394,7 @@ void VPattern::LiteParseTree(const Document &parse)
|
||||||
|
|
||||||
// Restore name current pattern piece
|
// Restore name current pattern piece
|
||||||
nameActivPP = namePP;
|
nameActivPP = namePP;
|
||||||
qCDebug(vXML, "Current pattern piece %s", nameActivPP.toUtf8().constData());
|
qCDebug(vXML, "Current pattern piece %s", qUtf8Printable(nameActivPP));
|
||||||
setCurrentData();
|
setCurrentData();
|
||||||
emit FullUpdateFromFile();
|
emit FullUpdateFromFile();
|
||||||
// Recalculate scene rect
|
// Recalculate scene rect
|
||||||
|
@ -2375,7 +2375,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
qCDebug(vXML, "Point label: %s", name.toUtf8().constData());
|
qCDebug(vXML, "Point label: %s", qUtf8Printable(name));
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
else if (type == LabelType::NewLabel)
|
else if (type == LabelType::NewLabel)
|
||||||
|
@ -2383,7 +2383,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa
|
||||||
if (drawList.isEmpty())
|
if (drawList.isEmpty())
|
||||||
{
|
{
|
||||||
const QString label = GetLabelBase(0);
|
const QString label = GetLabelBase(0);
|
||||||
qCDebug(vXML, "Point label: %s", label.toUtf8().constData());
|
qCDebug(vXML, "Point label: %s", qUtf8Printable(label));
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2411,7 +2411,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (data->IsUnique(name) == false || name == reservedName);
|
} while (data->IsUnique(name) == false || name == reservedName);
|
||||||
qCDebug(vXML, "Point label: %s", name.toUtf8().constData());
|
qCDebug(vXML, "Point label: %s", qUtf8Printable(name));
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
qCDebug(vXML, "Got unknow type %d", static_cast<int>(type));
|
qCDebug(vXML, "Got unknow type %d", static_cast<int>(type));
|
||||||
|
|
|
@ -432,7 +432,7 @@ void VDomDocument::CollectId(const QDomElement &node, QVector<quint32> &vector)
|
||||||
*/
|
*/
|
||||||
void VDomDocument::ValidateXML(const QString &schema, const QString &fileName)
|
void VDomDocument::ValidateXML(const QString &schema, const QString &fileName)
|
||||||
{
|
{
|
||||||
qCDebug(vXML, "Validation xml file %s.", fileName.toUtf8().constData());
|
qCDebug(vXML, "Validation xml file %s.", qUtf8Printable(fileName));
|
||||||
QFile pattern(fileName);
|
QFile pattern(fileName);
|
||||||
if (pattern.open(QIODevice::ReadOnly) == false)
|
if (pattern.open(QIODevice::ReadOnly) == false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,8 +72,8 @@ QString VAbstractPoint::PointName(quint32 id) const
|
||||||
}
|
}
|
||||||
catch (const VExceptionBadId &e)
|
catch (const VExceptionBadId &e)
|
||||||
{
|
{
|
||||||
qCDebug(vTool, "Error! Couldn't get point name. %s %s", e.ErrorMessage().toUtf8().constData(),
|
qCDebug(vTool, "Error! Couldn't get point name. %s %s", qUtf8Printable(e.ErrorMessage()),
|
||||||
e.DetailedInformation().toUtf8().constData());
|
qUtf8Printable(e.DetailedInformation()));
|
||||||
return QString("");// Return empty string for property browser
|
return QString("");// Return empty string for property browser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ void AddDet::undo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagDetails.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagDetails));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit NeedFullParsing();
|
emit NeedFullParsing();
|
||||||
|
@ -85,7 +85,7 @@ void AddDet::redo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagDetails.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagDetails));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RedoFullParsing();
|
RedoFullParsing();
|
||||||
|
|
|
@ -65,7 +65,7 @@ void AddDetNode::undo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagModeling.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagModeling));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ void AddDetNode::redo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagModeling.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagModeling));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ void AddUnionDetails::undo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagModeling.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagModeling));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit NeedFullParsing();
|
emit NeedFullParsing();
|
||||||
|
@ -83,7 +83,7 @@ void AddUnionDetails::redo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qCDebug(vUndo, "Can't find tag %s.", VAbstractPattern::TagModeling.toUtf8().constData());
|
qCDebug(vUndo, "Can't find tag %s.", qUtf8Printable(VAbstractPattern::TagModeling));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RedoFullParsing();
|
RedoFullParsing();
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "abstracttest.h"
|
#include "abstracttest.h"
|
||||||
|
#include "../vmisc/logging.h"
|
||||||
|
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ bool AbstractTest::Run(const QString &program, const QStringList &arguments)
|
||||||
if (not info.exists())
|
if (not info.exists())
|
||||||
{
|
{
|
||||||
const QString msg = QString("Can't find binary.\n%1").arg(parameters);
|
const QString msg = QString("Can't find binary.\n%1").arg(parameters);
|
||||||
QWARN(msg.toUtf8().constData());
|
QWARN(qUtf8Printable(msg));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +91,7 @@ bool AbstractTest::Run(const QString &program, const QStringList &arguments)
|
||||||
if (not process->waitForFinished())// 30 sec
|
if (not process->waitForFinished())// 30 sec
|
||||||
{
|
{
|
||||||
const QString msg = QString("The operation timed out or an error occurred.\n%1").arg(parameters);
|
const QString msg = QString("The operation timed out or an error occurred.\n%1").arg(parameters);
|
||||||
QWARN(msg.toUtf8().constData());
|
QWARN(qUtf8Printable(msg));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ bool AbstractTest::Run(const QString &program, const QStringList &arguments)
|
||||||
{
|
{
|
||||||
const QString msg = QString("Program crashed.\n%1\n%2").arg(parameters)
|
const QString msg = QString("Program crashed.\n%1\n%2").arg(parameters)
|
||||||
.arg(QString(process->readAllStandardError()));
|
.arg(QString(process->readAllStandardError()));
|
||||||
QWARN(msg.toUtf8().constData());
|
QWARN(qUtf8Printable(msg));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ bool AbstractTest::Run(const QString &program, const QStringList &arguments)
|
||||||
{
|
{
|
||||||
const QString msg = QString("Failed.\n%1\n%2").arg(parameters)
|
const QString msg = QString("Failed.\n%1\n%2").arg(parameters)
|
||||||
.arg(QString(process->readAllStandardError()));
|
.arg(QString(process->readAllStandardError()));
|
||||||
QWARN(msg.toUtf8().constData());
|
QWARN(qUtf8Printable(msg));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "tst_measurementregexp.h"
|
#include "tst_measurementregexp.h"
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../vmisc/def.h"
|
#include "../vmisc/def.h"
|
||||||
|
#include "../vmisc/logging.h"
|
||||||
#include "../vpatterndb/vtranslatemeasurements.h"
|
#include "../vpatterndb/vtranslatemeasurements.h"
|
||||||
|
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
@ -95,7 +96,7 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
const QString message = QString("Failed to check translation for system = p%1 and locale = %2")
|
const QString message = QString("Failed to check translation for system = p%1 and locale = %2")
|
||||||
.arg(s)
|
.arg(s)
|
||||||
.arg(locales.at(l));
|
.arg(locales.at(l));
|
||||||
QFAIL(message.toUtf8().constData());
|
QFAIL(qUtf8Printable(message));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NoError:
|
case NoError:
|
||||||
|
@ -111,7 +112,7 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
const QString message = QString("Can't remove translation for system = p%1 and locale = %2")
|
const QString message = QString("Can't remove translation for system = p%1 and locale = %2")
|
||||||
.arg(s)
|
.arg(s)
|
||||||
.arg(locales.at(l));
|
.arg(locales.at(l));
|
||||||
QWARN(message.toUtf8().constData());
|
QWARN(qUtf8Printable(message));
|
||||||
}
|
}
|
||||||
delete pmsTranslator;
|
delete pmsTranslator;
|
||||||
}
|
}
|
||||||
|
@ -398,7 +399,7 @@ int TST_MeasurementRegExp::LoadTranslation(const QString &checkedSystem, const Q
|
||||||
.arg(checkedLocale)
|
.arg(checkedLocale)
|
||||||
.arg(path)
|
.arg(path)
|
||||||
.arg(file);
|
.arg(file);
|
||||||
QWARN(message.toUtf8().constData());
|
QWARN(qUtf8Printable(message));
|
||||||
|
|
||||||
return ErrorSize;
|
return ErrorSize;
|
||||||
}
|
}
|
||||||
|
@ -412,7 +413,7 @@ int TST_MeasurementRegExp::LoadTranslation(const QString &checkedSystem, const Q
|
||||||
.arg(checkedLocale)
|
.arg(checkedLocale)
|
||||||
.arg(path)
|
.arg(path)
|
||||||
.arg(file);
|
.arg(file);
|
||||||
QWARN(message.toUtf8().constData());
|
QWARN(qUtf8Printable(message));
|
||||||
|
|
||||||
delete pmsTranslator;
|
delete pmsTranslator;
|
||||||
|
|
||||||
|
@ -426,7 +427,7 @@ int TST_MeasurementRegExp::LoadTranslation(const QString &checkedSystem, const Q
|
||||||
.arg(checkedLocale)
|
.arg(checkedLocale)
|
||||||
.arg(path)
|
.arg(path)
|
||||||
.arg(file);
|
.arg(file);
|
||||||
QWARN(message.toUtf8().constData());
|
QWARN(qUtf8Printable(message));
|
||||||
|
|
||||||
delete pmsTranslator;
|
delete pmsTranslator;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user