[kad-general] [PATCH] rename-latin1-qt3-funcion-to-qt4-toLatin1 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/kad-general Archives
]
From a00dd150f29fe6feab08dd47cc05680856d79671 Mon Sep 17 00:00:00 2001
From: Riccardo Gori <goric@xxxxxxxxxxx>
Date: Tue, 1 Apr 2008 22:39:38 +0200
Subject: [PATCH] rename latin1() qt3 funcion to qt4 toLatin1()
---
kad/src/qc_applicationwindow.cpp | 20 ++++++++++----------
kadgui/src/qg_filedialog.cpp | 12 ++++++------
kadgui/src/qg_fontbox.cpp | 4 ++--
kadgui/src/qg_layerbox.cpp | 2 +-
kadgui/src/qg_recentfiles.cpp | 2 +-
kadgui/src/ui/qg_blockdialog.ui.h | 2 +-
kadgui/src/ui/qg_dlgoptionsdrawing.ui.h | 2 +-
kadgui/src/ui/qg_dlgoptionsgeneral.ui.h | 4 ++--
kadgui/src/ui/qg_layerdialog.ui.h | 8 ++++----
kadgui/src/ui/qg_librarywidget.ui.h | 20 ++++++++++----------
qcadlib/src/debug/rs_debug.cpp | 6 +++---
qcadlib/src/engine/rs_entity.cpp | 2 +-
qcadlib/src/engine/rs_font.cpp | 8 ++++----
qcadlib/src/engine/rs_fontchar.h | 2 +-
qcadlib/src/engine/rs_hatch.h | 2 +-
qcadlib/src/engine/rs_insert.cpp | 2 +-
qcadlib/src/engine/rs_layerlist.cpp | 2 +-
qcadlib/src/engine/rs_patternlist.cpp | 8 ++++----
qcadlib/src/fileio/rs_fileio.cpp | 10 +++++-----
qcadlib/src/gui/rs_eventhandler.cpp | 6 +++---
qcadlib/src/scripting/rs_python.cpp | 2 +-
qcadlib/src/scripting/rs_scriptlist.cpp | 10 +++++-----
qcadlib/src/scripting/rs_simplepython.cpp | 2 +-
23 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/kad/src/qc_applicationwindow.cpp b/kad/src/qc_applicationwindow.cpp
index 06d8309..a1465b0 100644
--- a/kad/src/qc_applicationwindow.cpp
+++ b/kad/src/qc_applicationwindow.cpp
@@ -193,11 +193,11 @@ void QC_ApplicationWindow::slotRunScript(const QString& name) {
for (QStringList::Iterator it = scriptList.begin(); it!=scriptList.end(); ++it) {
RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: "
- "checking script '%s'", (*it).latin1());
+ "checking script '%s'", (*it).toLatin1());
QFileInfo fi(*it);
if (fi.exists() && fi.fileName()==name) {
RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: running '%s'",
- (*it).latin1());
+ (*it).toLatin1());
scripter->runScript(*it, "main");
}
}
@@ -215,7 +215,7 @@ void QC_ApplicationWindow::slotInsertBlock() {
if (s!=NULL) {
QString block = ((QAction*)s)->text();
RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: %s",
- block.latin1());
+ block.toLatin1());
slotInsertBlock(block);
}
}
@@ -226,7 +226,7 @@ void QC_ApplicationWindow::slotInsertBlock() {
* Called to insert blocks.
*/
void QC_ApplicationWindow::slotInsertBlock(const QString& name) {
- RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: '%s'", name.latin1());
+ RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1());
statusBar()->message(tr("Inserting block '%1'").arg(name), 2000);
@@ -1965,9 +1965,9 @@ void QC_ApplicationWindow::slotHelpManual() {
if (assistant==NULL) {
RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s",
- RS_SYSTEM->getAppDir().latin1());
+ RS_SYSTEM->getAppDir().toLatin1());
RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s",
- RS_SYSTEM->getAppDir().latin1());
+ RS_SYSTEM->getAppDir().toLatin1());
assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this);
connect(assistant, SIGNAL(error(const QString&)),
this, SLOT(slotError(const QString&)));
@@ -2139,10 +2139,10 @@ void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer* d) {
<< d->getExtensionPoint2()
<< "</td>"
<< "<td>Text: "
- << d->getText().latin1()
+ << d->getText().toLatin1()
<< "</td>"
<< "<td>Label: "
- << d->getLabel().latin1()
+ << d->getLabel().toLatin1()
<< "</td>"
<< "</tr></table>";
}
@@ -2199,7 +2199,7 @@ void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer* d) {
dumpFile
<< "<tr>"
<< "<td>Text:"
- << t->getText().latin1()
+ << t->getText().toLatin1()
<< "</td>"
<< "<td>Height:"
<< t->getHeight()
@@ -2217,7 +2217,7 @@ void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer* d) {
dumpFile
<< "<tr>"
<< "<td>Pattern:"
- << h->getPattern().latin1()
+ << h->getPattern().toLatin1()
<< "</td>"
<< "<td>Scale:"
<< h->getScale()
diff --git a/kadgui/src/qg_filedialog.cpp b/kadgui/src/qg_filedialog.cpp
index 77e76a3..6bbff45 100644
--- a/kadgui/src/qg_filedialog.cpp
+++ b/kadgui/src/qg_filedialog.cpp
@@ -170,16 +170,16 @@ QString QG_FileDialog::getOpenFileName(QWidget* parent, RS2::FormatType* type) {
QString defFilter = "Drawing Exchange (*.dxf *.DXF)";
RS_SETTINGS->endGroup();
- RS_DEBUG->print("defDir: %s", defDir.latin1());
- RS_DEBUG->print("defFilter: %s", defFilter.latin1());
+ RS_DEBUG->print("defDir: %s", defDir.toLatin1());
+ RS_DEBUG->print("defFilter: %s", defFilter.toLatin1());
QString fDxf(QObject::tr("Drawing Exchange %1").arg("(*.dxf *.DXF)"));
QString fDxf1(QObject::tr("QCad 1.x file %1").arg("(*.dxf *.DXF)"));
QString fCxf(QObject::tr("Font %1").arg("(*.cxf)"));
- RS_DEBUG->print("fDxf: %s", fDxf.latin1());
- RS_DEBUG->print("fDxf1: %s", fDxf1.latin1());
- RS_DEBUG->print("fCxf: %s", fCxf.latin1());
+ RS_DEBUG->print("fDxf: %s", fDxf.toLatin1());
+ RS_DEBUG->print("fDxf1: %s", fDxf1.toLatin1());
+ RS_DEBUG->print("fCxf: %s", fCxf.toLatin1());
QString fn = "";
bool cancel = false;
@@ -232,7 +232,7 @@ QString QG_FileDialog::getOpenFileName(QWidget* parent, RS2::FormatType* type) {
RS_SETTINGS->endGroup();
}
- RS_DEBUG->print("QG_FileDialog::getOpenFileName: fileName: %s", fn.latin1());
+ RS_DEBUG->print("QG_FileDialog::getOpenFileName: fileName: %s", fn.toLatin1());
RS_DEBUG->print("QG_FileDialog::getOpenFileName: OK");
delete prev;
diff --git a/kadgui/src/qg_fontbox.cpp b/kadgui/src/qg_fontbox.cpp
index 8931eb6..8101e8b 100644
--- a/kadgui/src/qg_fontbox.cpp
+++ b/kadgui/src/qg_fontbox.cpp
@@ -78,7 +78,7 @@ void QG_FontBox::init() {
*/
void QG_FontBox::setFont(const QString& fName) {
- RS_DEBUG->print("QG_FontBox::setFont %s\n", fName.latin1());
+ RS_DEBUG->print("QG_FontBox::setFont %s\n", fName.toLatin1());
#if QT_VERSION>=0x030000
setCurrentText(fName);
@@ -103,7 +103,7 @@ void QG_FontBox::slotFontChanged(int index) {
if (currentFont!=NULL) {
RS_DEBUG->print("Current font is (%d): %s\n",
- index, currentFont->getFileName().latin1());
+ index, currentFont->getFileName().toLatin1());
}
emit fontChanged(currentFont);
diff --git a/kadgui/src/qg_layerbox.cpp b/kadgui/src/qg_layerbox.cpp
index df39fd8..13489bd 100644
--- a/kadgui/src/qg_layerbox.cpp
+++ b/kadgui/src/qg_layerbox.cpp
@@ -126,7 +126,7 @@ void QG_LayerBox::slotLayerChanged(int index) {
currentLayer = layerList->find(itemText(index));
//printf("Current color is (%d): %s\n",
- // index, currentLayer.name().latin1());
+ // index, currentLayer.name().toLatin1());
emit layerChanged(currentLayer);
}
diff --git a/kadgui/src/qg_recentfiles.cpp b/kadgui/src/qg_recentfiles.cpp
index 28007ca..36b7d65 100644
--- a/kadgui/src/qg_recentfiles.cpp
+++ b/kadgui/src/qg_recentfiles.cpp
@@ -68,7 +68,7 @@ void QG_RecentFiles::add(const QString& filename) {
}
//for (int i=0; i<(int)files.count(); ++i) {
- // printf("recent file[%d]: %s\n", i, files[i].latin1());
+ // printf("recent file[%d]: %s\n", i, files[i].toLatin1());
//}
RS_DEBUG->print("QG_RecentFiles::add: OK");
}
diff --git a/kadgui/src/ui/qg_blockdialog.ui.h b/kadgui/src/ui/qg_blockdialog.ui.h
index 169890b..d157cd6 100644
--- a/kadgui/src/ui/qg_blockdialog.ui.h
+++ b/kadgui/src/ui/qg_blockdialog.ui.h
@@ -25,7 +25,7 @@ RS_BlockData QG_BlockDialog::getBlockData() {
/*if (blockList!=NULL) {
RS_Block* block = blockList->getActive();
if (block!=NULL) {
- return blockList->rename(block, leName->text().latin1());
+ return blockList->rename(block, leName->text().toLatin1());
}
}
diff --git a/kadgui/src/ui/qg_dlgoptionsdrawing.ui.h b/kadgui/src/ui/qg_dlgoptionsdrawing.ui.h
index 39af918..b35f391 100644
--- a/kadgui/src/ui/qg_dlgoptionsdrawing.ui.h
+++ b/kadgui/src/ui/qg_dlgoptionsdrawing.ui.h
@@ -280,7 +280,7 @@ void QG_DlgOptionsDrawing::validate() {
(int)RS_Math::eval(cbSplineSegs->currentText()), 70);
RS_DEBUG->print("QG_DlgOptionsDrawing::validate: splinesegs is: %s",
- cbSplineSegs->currentText().latin1());
+ cbSplineSegs->currentText().toLatin1());
// update all dimension and spline entities in the graphic to match the new settings:
graphic->updateDimensions();
diff --git a/kadgui/src/ui/qg_dlgoptionsgeneral.ui.h b/kadgui/src/ui/qg_dlgoptionsgeneral.ui.h
index 8ae14b7..bb7a07d 100644
--- a/kadgui/src/ui/qg_dlgoptionsgeneral.ui.h
+++ b/kadgui/src/ui/qg_dlgoptionsgeneral.ui.h
@@ -22,11 +22,11 @@ void QG_DlgOptionsGeneral::init() {
it++) {
RS_DEBUG->print("QG_DlgOptionsGeneral::init: adding %s to combobox",
- (*it).latin1());
+ (*it).toLatin1());
QString l = RS_SYSTEM->symbolToLanguage(*it);
if (l.isEmpty()==false) {
- RS_DEBUG->print("QG_DlgOptionsGeneral::init: %s", l.latin1());
+ RS_DEBUG->print("QG_DlgOptionsGeneral::init: %s", l.toLatin1());
cbLanguage->insertItem(l);
cbLanguageCmd->insertItem(l);
}
diff --git a/kadgui/src/ui/qg_layerdialog.ui.h b/kadgui/src/ui/qg_layerdialog.ui.h
index 2ecae66..dbff18a 100644
--- a/kadgui/src/ui/qg_layerdialog.ui.h
+++ b/kadgui/src/ui/qg_layerdialog.ui.h
@@ -18,21 +18,21 @@ void QG_LayerDialog::setLayer(RS_Layer* l) {
}
void QG_LayerDialog::updateLayer() {
- layer->setName(leName->text().latin1());
+ layer->setName(leName->text().toLatin1());
layer->setPen(wPen->getPen());
}
void QG_LayerDialog::validate() {
if (layerList != NULL &&
- (editLayer == FALSE || layerName != leName->text().latin1())) {
- RS_Layer* l = layerList->find(leName->text().latin1());
+ (editLayer == FALSE || layerName != leName->text().toLatin1())) {
+ RS_Layer* l = layerList->find(leName->text().toLatin1());
if (l != NULL) {
QMessageBox::information(parentWidget(),
QMessageBox::tr("Layer Properties"),
QMessageBox::tr("Layer with a name \"%1\" "
"already exists. Please specify "
"a different name.")
- .arg(leName->text().latin1()),
+ .arg(leName->text().toLatin1()),
QMessageBox::Ok);
leName->setFocus();
leName->selectAll();
diff --git a/kadgui/src/ui/qg_librarywidget.ui.h b/kadgui/src/ui/qg_librarywidget.ui.h
index 948f01e..5dc00ac 100644
--- a/kadgui/src/ui/qg_librarywidget.ui.h
+++ b/kadgui/src/ui/qg_librarywidget.ui.h
@@ -62,7 +62,7 @@ void QG_LibraryWidget::insert() {
}
} else {
RS_DEBUG->print(RS_Debug::D_ERROR,
- "QG_LibraryWidget::insert: Can't read file: '%s'", dxfPath.latin1());
+ "QG_LibraryWidget::insert: Can't read file: '%s'", dxfPath.toLatin1());
}
}
@@ -248,7 +248,7 @@ QString QG_LibraryWidget::getPathToPixmap(const QString& dir,
RS_DEBUG->print("QG_LibraryWidget::getPathToPixmap: "
"dir: '%s' dxfFile: '%s' dxfPath: '%s'",
- dir.latin1(), dxfFile.latin1(), dxfPath.latin1());
+ dir.toLatin1(), dxfFile.toLatin1(), dxfPath.toLatin1());
// List of all directories that contain part libraries:
QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
@@ -265,20 +265,20 @@ QString QG_LibraryWidget::getPathToPixmap(const QString& dir,
itemDir = (*it)+dir;
pngPath = itemDir + "/" + fiDxf.baseName(true) + ".png";
RS_DEBUG->print("QG_LibraryWidget::getPathToPixmap: checking: '%s'",
- pngPath.latin1());
+ pngPath.toLatin1());
QFileInfo fiPng(pngPath);
// the thumbnail exists:
if (fiPng.isFile()) {
RS_DEBUG->print("QG_LibraryWidget::getPathToPixmap: dxf date: %s, png date: %s",
- fiDxf.lastModified().toString().latin1(), fiPng.lastModified().toString().latin1());
+ fiDxf.lastModified().toString().toLatin1(), fiPng.lastModified().toString().toLatin1());
if (fiPng.lastModified() > fiDxf.lastModified()) {
RS_DEBUG->print("QG_LibraryWidget::getPathToPixmap: thumbnail found: '%s'",
- pngPath.latin1());
+ pngPath.toLatin1());
return pngPath;
} else {
RS_DEBUG->print("QG_LibraryWidget::getPathToPixmap: thumbnail needs to be updated: '%s'",
- pngPath.latin1());
+ pngPath.toLatin1());
}
}
}
@@ -297,12 +297,12 @@ QString QG_LibraryWidget::getPathToPixmap(const QString& dir,
if (created.isEmpty() || QFileInfo(created).isDir() || dr.mkdir(created, true)) {
RS_DEBUG->print("QG_LibraryWidget: Created directory '%s'",
- created.latin1());
+ created.toLatin1());
}
else {
RS_DEBUG->print(RS_Debug::D_ERROR,
"QG_LibraryWidget: Cannot create directory '%s'",
- created.latin1());
+ created.toLatin1());
return "";
}
}
@@ -343,12 +343,12 @@ QString QG_LibraryWidget::getPathToPixmap(const QString& dir,
pngPath = "";
RS_DEBUG->print(RS_Debug::D_ERROR,
"QG_LibraryWidget::getPathToPixmap: Cannot write thumbnail: '%s'",
- pngPath.latin1());
+ pngPath.toLatin1());
}
} else {
RS_DEBUG->print(RS_Debug::D_ERROR,
"QG_LibraryWidget::getPathToPixmap: Cannot open file: '%s'",
- dxfPath.latin1());
+ dxfPath.toLatin1());
}
// GraphicView deletes painter
diff --git a/qcadlib/src/debug/rs_debug.cpp b/qcadlib/src/debug/rs_debug.cpp
index 259dfdc..0fff86f 100644
--- a/qcadlib/src/debug/rs_debug.cpp
+++ b/qcadlib/src/debug/rs_debug.cpp
@@ -60,7 +60,7 @@ RS_Debug* RS_Debug::instance() {
.arg(nowStr);
uniqueInstance = new RS_Debug;
- //uniqueInstance->stream = fopen(fName.latin1(), "wt");
+ //uniqueInstance->stream = fopen(fName.toLatin1(), "wt");
uniqueInstance->stream = stderr;
}
return uniqueInstance;
@@ -154,7 +154,7 @@ void RS_Debug::timestamp() {
#else
nowStr = now.toString();
#endif
- fprintf(stream, nowStr.latin1());
+ fprintf(stream, nowStr.toLatin1());
fprintf(stream, "\n");
fflush(stream);
}
@@ -165,7 +165,7 @@ void RS_Debug::timestamp() {
*/
void RS_Debug::printUnicode(const QString& text) {
for (int i=0; i<(int)text.length(); i++) {
- print("[%X] %c", text.at(i).unicode(), text.at(i).latin1());
+ print("[%X] %c", text.at(i).unicode(), text.at(i).toLatin1());
}
}
diff --git a/qcadlib/src/engine/rs_entity.cpp b/qcadlib/src/engine/rs_entity.cpp
index 29ef670..00a0172 100644
--- a/qcadlib/src/engine/rs_entity.cpp
+++ b/qcadlib/src/engine/rs_entity.cpp
@@ -872,7 +872,7 @@ std::ostream& operator << (std::ostream& os, RS_Entity& e) {
if (e.layer==NULL) {
os << " layer: NULL ";
} else {
- os << " layer: " << e.layer->getName().latin1() << " ";
+ os << " layer: " << e.layer->getName().toLatin1() << " ";
os << " layer address: " << (int)(e.layer) << " ";
}
diff --git a/qcadlib/src/engine/rs_font.cpp b/qcadlib/src/engine/rs_font.cpp
index 7396b19..451e2a6 100644
--- a/qcadlib/src/engine/rs_font.cpp
+++ b/qcadlib/src/engine/rs_font.cpp
@@ -106,12 +106,12 @@ bool RS_Font::loadFont() {
if (!f.open(QIODevice::ReadOnly)) {
RS_DEBUG->print(RS_Debug::D_WARNING,
"RS_Font::loadFont: Cannot open font file: %s",
- path.latin1());
+ path.toLatin1());
return false;
} else {
RS_DEBUG->print("RS_Font::loadFont: "
"Successfully opened font file: %s",
- path.latin1());
+ path.toLatin1());
}
RS_TextStream ts(&f);
@@ -170,7 +170,7 @@ bool RS_Font::loadFont() {
else if (line.find(']')>=3) {
int i = line.find(']');
QString mid = line.mid(1, i-1);
- ch = QString::fromUtf8(mid.latin1()).at(0);
+ ch = QString::fromUtf8(mid.toLatin1()).at(0);
}
// read normal ascii character:
@@ -243,7 +243,7 @@ bool RS_Font::loadFont() {
* Dumps the fonts data to stdout.
*/
std::ostream& operator << (std::ostream& os, const RS_Font& f) {
- os << " Font file name: " << f.getFileName().latin1() << "\n";
+ os << " Font file name: " << f.getFileName().toLatin1() << "\n";
//<< (RS_BlockList&)f << "\n";
return os;
}
diff --git a/qcadlib/src/engine/rs_fontchar.h b/qcadlib/src/engine/rs_fontchar.h
index 8dd4369..776b0b2 100644
--- a/qcadlib/src/engine/rs_fontchar.h
+++ b/qcadlib/src/engine/rs_fontchar.h
@@ -58,7 +58,7 @@ public:
/*friend std::ostream& operator << (std::ostream& os, const RS_FontChar& b) {
- os << " name: " << b.getName().latin1() << "\n";
+ os << " name: " << b.getName().toLatin1() << "\n";
os << " entities: " << (RS_EntityContainer&)b << "\n";
return os;
}*/
diff --git a/qcadlib/src/engine/rs_hatch.h b/qcadlib/src/engine/rs_hatch.h
index a724fd2..73024c7 100644
--- a/qcadlib/src/engine/rs_hatch.h
+++ b/qcadlib/src/engine/rs_hatch.h
@@ -55,7 +55,7 @@ public:
this->angle = angle;
this->pattern = pattern;
- //std::cout << "RS_HatchData: " << pattern.latin1() << "\n";
+ //std::cout << "RS_HatchData: " << pattern.toLatin1() << "\n";
}
friend std::ostream& operator << (std::ostream& os, const RS_HatchData& td) {
diff --git a/qcadlib/src/engine/rs_insert.cpp b/qcadlib/src/engine/rs_insert.cpp
index 497d623..3df9661 100644
--- a/qcadlib/src/engine/rs_insert.cpp
+++ b/qcadlib/src/engine/rs_insert.cpp
@@ -60,7 +60,7 @@ RS_Insert::~RS_Insert() {}
void RS_Insert::update() {
RS_DEBUG->print("RS_Insert::update");
- RS_DEBUG->print("RS_Insert::update: name: %s", data.name.latin1());
+ RS_DEBUG->print("RS_Insert::update: name: %s", data.name.toLatin1());
RS_DEBUG->print("RS_Insert::update: insertionPoint: %f/%f",
data.insertionPoint.x, data.insertionPoint.y);
diff --git a/qcadlib/src/engine/rs_layerlist.cpp b/qcadlib/src/engine/rs_layerlist.cpp
index c3ed9fa..41f68ad 100644
--- a/qcadlib/src/engine/rs_layerlist.cpp
+++ b/qcadlib/src/engine/rs_layerlist.cpp
@@ -72,7 +72,7 @@ void RS_LayerList::activate(RS_Layer* layer, bool notify) {
/*if (layer!=NULL) {
RS_DEBUG->print("RS_LayerList::activate: %s",
- layer->getName().latin1());
+ layer->getName().toLatin1());
} else {
RS_DEBUG->print("RS_LayerList::activate: NULL");
}*/
diff --git a/qcadlib/src/engine/rs_patternlist.cpp b/qcadlib/src/engine/rs_patternlist.cpp
index 38f73b8..4b55ba5 100644
--- a/qcadlib/src/engine/rs_patternlist.cpp
+++ b/qcadlib/src/engine/rs_patternlist.cpp
@@ -58,13 +58,13 @@ void RS_PatternList::init() {
for (QStringList::Iterator it = list.begin();
it != list.end(); ++it) {
- RS_DEBUG->print("pattern: %s:", (*it).latin1());
+ RS_DEBUG->print("pattern: %s:", (*it).toLatin1());
RS_FileInfo fi(*it);
pattern = new RS_Pattern(fi.baseName().lower());
patterns.append(pattern);
- RS_DEBUG->print("base: %s", pattern->getFileName().latin1());
+ RS_DEBUG->print("base: %s", pattern->getFileName().toLatin1());
}
}
@@ -104,12 +104,12 @@ void RS_PatternList::removePattern(RS_Pattern* pattern) {
* memory if it's not already.
*/
RS_Pattern* RS_PatternList::requestPattern(const QString& name) {
- RS_DEBUG->print("RS_PatternList::requestPattern %s", name.latin1());
+ RS_DEBUG->print("RS_PatternList::requestPattern %s", name.toLatin1());
QString name2 = name.lower();
RS_Pattern* foundPattern = NULL;
- RS_DEBUG->print("name2: %s", name2.latin1());
+ RS_DEBUG->print("name2: %s", name2.toLatin1());
// Search our list of available patterns:
for (RS_Pattern* p=patterns.first();
diff --git a/qcadlib/src/fileio/rs_fileio.cpp b/qcadlib/src/fileio/rs_fileio.cpp
index 52db4cb..5457c71 100644
--- a/qcadlib/src/fileio/rs_fileio.cpp
+++ b/qcadlib/src/fileio/rs_fileio.cpp
@@ -46,7 +46,7 @@ RS_FileIO* RS_FileIO::uniqueInstance = NULL;
bool RS_FileIO::fileImport(RS_Graphic& graphic, const RS_String& file,
RS2::FormatType type) {
- RS_DEBUG->print("Trying to import file '%s'...", file.latin1());
+ RS_DEBUG->print("Trying to import file '%s'...", file.toLatin1());
RS_FilterInterface* filter = NULL;
@@ -85,7 +85,7 @@ bool RS_FileIO::fileImport(RS_Graphic& graphic, const RS_String& file,
else {
RS_DEBUG->print(RS_Debug::D_WARNING,
"RS_FileIO::fileImport: failed to import file: %s",
- file.latin1());
+ file.toLatin1());
}
return false;
@@ -103,7 +103,7 @@ bool RS_FileIO::fileExport(RS_Graphic& graphic, const RS_String& file,
RS2::FormatType type) {
RS_DEBUG->print("RS_FileIO::fileExport");
- //RS_DEBUG->print("Trying to export file '%s'...", file.latin1());
+ //RS_DEBUG->print("Trying to export file '%s'...", file.toLatin1());
if (type==RS2::FormatUnknown) {
RS_String extension;
@@ -145,12 +145,12 @@ RS2::FormatType RS_FileIO::detectFormat(const RS_String& file) {
if (!f.open(QIODevice::ReadOnly)) {
// Error opening file:
RS_DEBUG->print(RS_Debug::D_WARNING,
- "RS_FileIO::detectFormat: Cannot open file: %s", file.latin1());
+ "RS_FileIO::detectFormat: Cannot open file: %s", file.toLatin1());
type = RS2::FormatUnknown;
} else {
RS_DEBUG->print("RS_FileIO::detectFormat: "
"Successfully opened DXF file: %s",
- file.latin1());
+ file.toLatin1());
RS_TextStream ts(&f);
RS_String line;
diff --git a/qcadlib/src/gui/rs_eventhandler.cpp b/qcadlib/src/gui/rs_eventhandler.cpp
index 219e0e6..6de2acb 100644
--- a/qcadlib/src/gui/rs_eventhandler.cpp
+++ b/qcadlib/src/gui/rs_eventhandler.cpp
@@ -130,7 +130,7 @@ void RS_EventHandler::mouseReleaseEvent(RS_MouseEvent* e) {
if (actionIndex>=0 && currentActions[actionIndex]!=NULL &&
!currentActions[actionIndex]->isFinished()) {
RS_DEBUG->print("call action %s",
- currentActions[actionIndex]->getName().latin1());
+ currentActions[actionIndex]->getName().toLatin1());
currentActions[actionIndex]->mouseReleaseEvent(e);
@@ -496,7 +496,7 @@ void RS_EventHandler::setCurrentAction(RS_ActionInterface* action) {
// Set current action:
currentActions[actionIndex] = action;
RS_DEBUG->print("RS_EventHandler::setCurrentAction: current action is: %s",
- currentActions[actionIndex]->getName().latin1());
+ currentActions[actionIndex]->getName().toLatin1());
// Initialisation of our new action:
RS_DEBUG->print("RS_EventHandler::setCurrentAction: init current action");
@@ -677,7 +677,7 @@ void RS_EventHandler::debugActions() {
}
if (currentActions[c]!=NULL) {
RS_DEBUG->print("Action %03d: %s [%s]",
- c, currentActions[c]->getName().latin1(),
+ c, currentActions[c]->getName().toLatin1(),
currentActions[c]->isFinished() ? "finished" : "active");
} else {
RS_DEBUG->print("Action %03d: NULL", c);
diff --git a/qcadlib/src/scripting/rs_python.cpp b/qcadlib/src/scripting/rs_python.cpp
index 22efe33..661facc 100644
--- a/qcadlib/src/scripting/rs_python.cpp
+++ b/qcadlib/src/scripting/rs_python.cpp
@@ -100,7 +100,7 @@ int RS_Python::launch(const RS_String& script) {
}
Py_XDECREF(mod);
} else {
- printf("*** ERROR LOADING SCRIPT '%s' ***\n", script.latin1());
+ printf("*** ERROR LOADING SCRIPT '%s' ***\n", script.toLatin1());
PyErr_Print();
}
Py_XDECREF(modname);
diff --git a/qcadlib/src/scripting/rs_scriptlist.cpp b/qcadlib/src/scripting/rs_scriptlist.cpp
index c6a66b0..1f38715 100644
--- a/qcadlib/src/scripting/rs_scriptlist.cpp
+++ b/qcadlib/src/scripting/rs_scriptlist.cpp
@@ -57,14 +57,14 @@ void RS_ScriptList::init() {
for ( RS_StringList::Iterator it = list.begin();
it != list.end(); ++it ) {
- RS_DEBUG->print("script: %s:", (*it).latin1());
+ RS_DEBUG->print("script: %s:", (*it).toLatin1());
RS_FileInfo fi(*it);
script = new RS_Script(fi.baseName(), fi.absFilePath());
scripts.append(script);
- RS_DEBUG->print("base: %s", fi.baseName().latin1());
- RS_DEBUG->print("path: %s", fi.absFilePath().latin1());
+ RS_DEBUG->print("base: %s", fi.baseName().toLatin1());
+ RS_DEBUG->print("path: %s", fi.absFilePath().toLatin1());
}
//RS_Script* f = new RS_Script("normal");
@@ -114,12 +114,12 @@ void RS_ScriptList::removeScript(RS_Script* script) {
* memory if it's not already.
*/
RS_Script* RS_ScriptList::requestScript(const RS_String& name) {
- RS_DEBUG->print("RS_ScriptList::requestScript %s", name.latin1());
+ RS_DEBUG->print("RS_ScriptList::requestScript %s", name.toLatin1());
RS_String name2 = name.lower();
RS_Script* foundScript = NULL;
- RS_DEBUG->print("name2: %s", name2.latin1());
+ RS_DEBUG->print("name2: %s", name2.toLatin1());
// Search our list of available scripts:
for (RS_Script* s=scripts.first();
diff --git a/qcadlib/src/scripting/rs_simplepython.cpp b/qcadlib/src/scripting/rs_simplepython.cpp
index a26d264..115c691 100644
--- a/qcadlib/src/scripting/rs_simplepython.cpp
+++ b/qcadlib/src/scripting/rs_simplepython.cpp
@@ -82,7 +82,7 @@ int RS_SimplePython::launch(const RS_String& script) {
}
Py_XDECREF(mod);
} else {
- printf("no such module: %s\n", script.latin1());
+ printf("no such module: %s\n", script.toLatin1());
}
Py_XDECREF(modname);
Py_Finalize();
--
1.5.3.7