Removed all calls to ascii() to hopefully solve utf-8/latin string issue

git-svn-id: http://svn.osgeo.org/qgis/trunk@2355 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2004-11-27 19:19:17 +00:00
parent 43925bbf74
commit 0a65bcb951
15 changed files with 113 additions and 113 deletions

View File

@ -621,7 +621,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
QString myFullPath = thePluginDirString + "/" + myPluginDir[i];
#ifdef QGISDEBUG
std::cerr << "Examining " << myFullPath.ascii() << std::endl;
std::cerr << "Examining " << myFullPath << std::endl;
#endif
QLibrary *myLib = new QLibrary(myFullPath);
@ -629,7 +629,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
if (loaded)
{
//purposely leaving this one to stdout!
std::cout << "Loaded " << myLib->library().ascii() << std::endl;
std::cout << "Loaded " << myLib->library() << std::endl;
name_t * myName =(name_t *) myLib->resolve("name");
description_t * myDescription = (description_t *) myLib->resolve("description");
version_t * myVersion = (version_t *) myLib->resolve("version");
@ -643,7 +643,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
if (mySettings.readBoolEntry("/qgis/Plugins/" + myEntryName))
{
#ifdef QGISDEBUG
std::cerr << " -------------------- loading " << myEntryName.ascii() << std::endl;
std::cerr << " -------------------- loading " << myEntryName << std::endl;
#endif
loadPlugin(myName(), myDescription(), myFullPath);
@ -652,14 +652,14 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
else
{
#ifdef QGISDEBUG
std::cerr << "Failed to get name, description, or type for " << myLib->library().ascii() << std::endl;
std::cerr << "Failed to get name, description, or type for " << myLib->library() << std::endl;
#endif
}
}
else
{
std::cerr << "Failed to load " << myLib->library().ascii() << std::endl;
std::cerr << "Failed to load " << myLib->library() << std::endl;
}
}
}
@ -2432,7 +2432,7 @@ void QgisApp::loadPlugin(QString name, QString description, QString theFullPathN
QLibrary *myLib = new QLibrary(theFullPathName);
#ifdef QGISDEBUG
std::cerr << "Library name is " << myLib->library().ascii() << std::endl;
std::cerr << "Library name is " << myLib->library() << std::endl;
#endif
bool loaded = myLib->load();

View File

@ -328,7 +328,7 @@ void QgsContinuousColRenderer::readXML(const QDomNode& rnode, QgsVectorLayer& vl
void QgsContinuousColRenderer::writeXML(std::ostream& xml)
{
xml << "\t\t<continuoussymbol>\n";
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()).ascii() <<
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()) <<
"</classificationfield>\n";
@ -336,24 +336,24 @@ void QgsContinuousColRenderer::writeXML(std::ostream& xml)
QgsSymbol *lsymbol = lowestitem->getSymbol();
xml << "\t\t\t<lowestitem>\n";
xml << "\t\t\t\t<renderitem>\n";
xml << "\t\t\t\t<value>" << lowestitem->value().ascii() << "</value>\n";
xml << "\t\t\t\t<value>" << lowestitem->value() << "</value>\n";
xml << "\t\t\t\t\t<symbol>\n";
xml << "\t\t\t\t\t\t<outlinecolor red=\""
<< QString::number(lsymbol->pen().color().red()).ascii()
<< QString::number(lsymbol->pen().color().red())
<< "\" green=\""
<< QString::number(lsymbol->pen().color().green()).ascii()
<< QString::number(lsymbol->pen().color().green())
<< "\" blue=\""
<< QString::number(lsymbol->pen().color().blue()).ascii()
<< QString::number(lsymbol->pen().color().blue())
<< "\" />\n";
xml << "\t\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(lsymbol->pen().style()).ascii() << "</outlinestyle>\n";
xml << "\t\t\t\t\t\t<outlinewidth>" << QString::number(lsymbol->pen().width()).ascii() << "</outlinewidth>\n";
xml << "\t\t\t\t\t\t<fillcolor red=\"" << QString::number(lsymbol->brush().color().red()).ascii() << "\" green=\"" <<
QString::number(lsymbol->brush().color().green()).ascii() << "\" blue=\"" <<
QString::number(lsymbol->brush().color().blue()).ascii() << "\" />\n";
xml << "\t\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(lsymbol->brush().style()).ascii() <<
xml << "\t\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(lsymbol->pen().style()) << "</outlinestyle>\n";
xml << "\t\t\t\t\t\t<outlinewidth>" << QString::number(lsymbol->pen().width()) << "</outlinewidth>\n";
xml << "\t\t\t\t\t\t<fillcolor red=\"" << QString::number(lsymbol->brush().color().red()) << "\" green=\"" <<
QString::number(lsymbol->brush().color().green()) << "\" blue=\"" <<
QString::number(lsymbol->brush().color().blue()) << "\" />\n";
xml << "\t\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(lsymbol->brush().style()) <<
"</fillpattern>\n";
xml << "\t\t\t\t\t</symbol>\n";
xml << "\t\t\t\t\t<label>" << lowestitem->label().ascii() << "</label>\n";
xml << "\t\t\t\t\t<label>" << lowestitem->label() << "</label>\n";
xml << "\t\t\t\t</renderitem>\n";
xml << "\t\t\t</lowestitem>\n";
@ -363,19 +363,19 @@ void QgsContinuousColRenderer::writeXML(std::ostream& xml)
xml << "\t\t\t\t<renderitem>\n";
xml << "\t\t\t\t<value>" << highestitem->value() << "</value>\n";
xml << "\t\t\t\t\t<symbol>\n";
xml << "\t\t\t\t\t\t<outlinecolor red=\"" << QString::number(hsymbol->pen().color().red()).ascii() << "\" green=\"" <<
QString::number(hsymbol->pen().color().green()).ascii() << "\" blue=\"" << QString::number(hsymbol->pen().color().blue()).ascii() <<
xml << "\t\t\t\t\t\t<outlinecolor red=\"" << QString::number(hsymbol->pen().color().red()) << "\" green=\"" <<
QString::number(hsymbol->pen().color().green()) << "\" blue=\"" << QString::number(hsymbol->pen().color().blue()) <<
"\" />\n";
xml << "\t\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(hsymbol->pen().style()).ascii() <<
xml << "\t\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(hsymbol->pen().style()) <<
"</outlinestyle>\n";
xml << "\t\t\t\t\t\t<outlinewidth>" << QString::number(hsymbol->pen().width()).ascii() << "</outlinewidth>\n";
xml << "\t\t\t\t\t\t<fillcolor red=\"" << QString::number(hsymbol->brush().color().red()).ascii() << "\" green=\"" <<
QString::number(hsymbol->brush().color().green()).ascii() << "\" blue=\"" <<
QString::number(hsymbol->brush().color().blue()).ascii() << "\" />\n";
xml << "\t\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(hsymbol->brush().style()).ascii() <<
xml << "\t\t\t\t\t\t<outlinewidth>" << QString::number(hsymbol->pen().width()) << "</outlinewidth>\n";
xml << "\t\t\t\t\t\t<fillcolor red=\"" << QString::number(hsymbol->brush().color().red()) << "\" green=\"" <<
QString::number(hsymbol->brush().color().green()) << "\" blue=\"" <<
QString::number(hsymbol->brush().color().blue()) << "\" />\n";
xml << "\t\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(hsymbol->brush().style()) <<
"</fillpattern>\n";
xml << "\t\t\t\t\t</symbol>\n";
xml << "\t\t\t\t\t<label>" << highestitem->label().ascii() << "</label>\n";
xml << "\t\t\t\t\t<label>" << highestitem->label() << "</label>\n";
xml << "\t\t\t\t</renderitem>\n";
xml << "\t\t\t</highestitem>\n";
xml << "\t\t</continuoussymbol>\n";

View File

@ -164,7 +164,7 @@ void QgsDlgVectorLayerProperties::alterLayerDialog(const QString & dialogString)
{
#ifdef QGISDEBUG
qDebug( "%s:%d QgsDlgVectorLayerProperties::alterLayerDialog(%s)",
__FILE__, __LINE__, dialogString.ascii() );
__FILE__, __LINE__, dialogString );
#endif
if (rendererDirty)
{

View File

@ -35,7 +35,7 @@ public:
{}
QgsException( QString const & what )
: what_( what.ascii() )
: what_( (const char *)what )
{}
virtual ~QgsException() throw()

View File

@ -188,29 +188,29 @@ void QgsGraduatedSymRenderer::readXML(const QDomNode& rnode, QgsVectorLayer& vl)
void QgsGraduatedSymRenderer::writeXML(std::ostream& xml)
{
xml << "\t\t<graduatedsymbol>\n";
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()).ascii() <<
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()) <<
"</classificationfield>\n";
for (std::list < QgsRangeRenderItem * >::iterator it = this->items().begin(); it != this->items().end();
++it)
{
xml << "\t\t\t<rangerenderitem>\n";
xml << "\t\t\t\t<lowervalue>" << (*it)->value().ascii() << "</lowervalue>\n";
xml << "\t\t\t\t<uppervalue>" << (*it)->upper_value().ascii() << "</uppervalue>\n";
xml << "\t\t\t\t<lowervalue>" << (*it)->value() << "</lowervalue>\n";
xml << "\t\t\t\t<uppervalue>" << (*it)->upper_value() << "</uppervalue>\n";
xml << "\t\t\t\t<symbol>\n";
QgsSymbol *symbol = (*it)->getSymbol();
xml << "\t\t\t\t\t<outlinecolor red=\"" << QString::number(symbol->pen().color().red()).ascii() << "\" green=\"" <<
QString::number(symbol->pen().color().green()).ascii() << "\" blue=\"" << QString::number(symbol->pen().color().blue()).ascii() <<
xml << "\t\t\t\t\t<outlinecolor red=\"" << QString::number(symbol->pen().color().red()) << "\" green=\"" <<
QString::number(symbol->pen().color().green()) << "\" blue=\"" << QString::number(symbol->pen().color().blue()) <<
"\" />\n";
xml << "\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(symbol->pen().style()).ascii() <<
xml << "\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(symbol->pen().style()) <<
"</outlinestyle>\n";
xml << "\t\t\t\t\t<outlinewidth>" << QString::number(symbol->pen().width()).ascii() << "</outlinewidth>\n";
xml << "\t\t\t\t\t<fillcolor red=\"" << QString::number(symbol->brush().color().red()).ascii() << "\" green=\"" <<
QString::number(symbol->brush().color().green()).ascii() << "\" blue=\"" <<
QString::number(symbol->brush().color().blue()).ascii() << "\" />\n";
xml << "\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(symbol->brush().style()).ascii() <<
xml << "\t\t\t\t\t<outlinewidth>" << QString::number(symbol->pen().width()) << "</outlinewidth>\n";
xml << "\t\t\t\t\t<fillcolor red=\"" << QString::number(symbol->brush().color().red()) << "\" green=\"" <<
QString::number(symbol->brush().color().green()) << "\" blue=\"" <<
QString::number(symbol->brush().color().blue()) << "\" />\n";
xml << "\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(symbol->brush().style()) <<
"</fillpattern>\n";
xml << "\t\t\t\t</symbol>\n";
xml << "\t\t\t\t<label>" << (*it)->label().ascii() << "</label>\n";
xml << "\t\t\t\t<label>" << (*it)->label() << "</label>\n";
xml << "\t\t\t</rangerenderitem>\n";
}
xml << "\t\t</graduatedsymbol>\n";

View File

@ -614,55 +614,55 @@ void QgsLabel::writeXML(std::ostream& xml)
xml << "\t\t<labelattributes>\n";
/* Text */
xml << "\t\t\t<label text=\"" << mLabelAttributes->text().ascii() << "\" field=\"" << mLabelField[Text].ascii() << "\" />\n";
xml << "\t\t\t<label text=\"" << mLabelAttributes->text() << "\" field=\"" << mLabelField[Text] << "\" />\n";
/* Family */
xml << "\t\t\t<family name=\"" << mLabelAttributes->family().ascii() << "\" field=\"" << mLabelField[Family].ascii() << "\" />\n";
xml << "\t\t\t<family name=\"" << mLabelAttributes->family() << "\" field=\"" << mLabelField[Family] << "\" />\n";
/* Size */
xml << "\t\t\t<size value=\"" << mLabelAttributes->size() << "\" units=\""
<< (const char *)QgsLabelAttributes::unitsName(mLabelAttributes->sizeType()) << "\" field=\"" << mLabelField[Size].ascii() << "\" />\n";
<< (const char *)QgsLabelAttributes::unitsName(mLabelAttributes->sizeType()) << "\" field=\"" << mLabelField[Size] << "\" />\n";
/* Bold */
xml << "\t\t\t<bold on=\"" << mLabelAttributes->bold() << "\" field=\"" << mLabelField[Bold].ascii() << "\" />\n";
xml << "\t\t\t<bold on=\"" << mLabelAttributes->bold() << "\" field=\"" << mLabelField[Bold] << "\" />\n";
/* Italic */
xml << "\t\t\t<italic on=\"" << mLabelAttributes->italic() << "\" field=\"" << mLabelField[Italic].ascii() << "\" />\n";
xml << "\t\t\t<italic on=\"" << mLabelAttributes->italic() << "\" field=\"" << mLabelField[Italic] << "\" />\n";
/* Underline */
xml << "\t\t\t<underline on=\"" << mLabelAttributes->underline() << "\" field=\"" << mLabelField[Underline].ascii() << "\" />\n";
xml << "\t\t\t<underline on=\"" << mLabelAttributes->underline() << "\" field=\"" << mLabelField[Underline] << "\" />\n";
/* Color */
xml << "\t\t\t<color red=\"" << mLabelAttributes->color().red() << "\" green=\"" << mLabelAttributes->color().green()
<< "\" blue=\"" << mLabelAttributes->color().blue() << "\" field=\"" << mLabelField[Color].ascii() << "\" />\n";
<< "\" blue=\"" << mLabelAttributes->color().blue() << "\" field=\"" << mLabelField[Color] << "\" />\n";
/* X */
xml << "\t\t\t<x field=\"" << mLabelField[XCoordinate].ascii() << "\" />\n";
xml << "\t\t\t<x field=\"" << mLabelField[XCoordinate] << "\" />\n";
/* Y */
xml << "\t\t\t<y field=\"" << mLabelField[YCoordinate].ascii() << "\" />\n";
xml << "\t\t\t<y field=\"" << mLabelField[YCoordinate] << "\" />\n";
/* Offset */
xml << "\t\t\t<offset units=\"" << QgsLabelAttributes::unitsName(mLabelAttributes->offsetType()).ascii()
<< "\" x=\"" << mLabelAttributes->xOffset() << "\" xfield=\"" << mLabelField[XOffset].ascii()
<< "\" y=\"" << mLabelAttributes->yOffset() << "\" yfield=\"" << mLabelField[YOffset].ascii()
xml << "\t\t\t<offset units=\"" << QgsLabelAttributes::unitsName(mLabelAttributes->offsetType())
<< "\" x=\"" << mLabelAttributes->xOffset() << "\" xfield=\"" << mLabelField[XOffset]
<< "\" y=\"" << mLabelAttributes->yOffset() << "\" yfield=\"" << mLabelField[YOffset]
<< "\" />\n";
/* Angle */
xml << "\t\t\t<angle value=\"" << mLabelAttributes->angle() << "\" field=\"" << mLabelField[Angle].ascii() << "\" />\n";
xml << "\t\t\t<angle value=\"" << mLabelAttributes->angle() << "\" field=\"" << mLabelField[Angle] << "\" />\n";
/* Alignment */
xml << "\t\t\t<alignment value=\"" << QgsLabelAttributes::alignmentName(mLabelAttributes->alignment()).ascii()
<< "\" field=\"" << mLabelField[Alignment].ascii() << "\" />\n";
xml << "\t\t\t<alignment value=\"" << QgsLabelAttributes::alignmentName(mLabelAttributes->alignment())
<< "\" field=\"" << mLabelField[Alignment] << "\" />\n";
// Buffer settings
xml << "\t\t\t<buffercolor red=\"" << mLabelAttributes->bufferColor().red() << "\" green=\"" << mLabelAttributes->bufferColor().green()
<< "\" blue=\"" << mLabelAttributes->bufferColor().blue() << "\" field=\"" << mLabelField[BufferColor].ascii() << "\" />\n";
<< "\" blue=\"" << mLabelAttributes->bufferColor().blue() << "\" field=\"" << mLabelField[BufferColor] << "\" />\n";
xml << "\t\t\t<buffersize value=\"" << mLabelAttributes->bufferSize() << "\" units=\""
<< (const char *)QgsLabelAttributes::unitsName(mLabelAttributes->bufferSizeType()) << "\" field=\"" << mLabelField[BufferSize].ascii() << "\" />\n";
<< (const char *)QgsLabelAttributes::unitsName(mLabelAttributes->bufferSizeType()) << "\" field=\"" << mLabelField[BufferSize] << "\" />\n";
xml << "\t\t\t<bufferenabled on=\"" << mLabelAttributes->bufferEnabled() << "\" field=\"" << mLabelField[BufferEnabled].ascii() << "\" />\n";
xml << "\t\t\t<bufferenabled on=\"" << mLabelAttributes->bufferEnabled() << "\" field=\"" << mLabelField[BufferEnabled] << "\" />\n";
xml << "\t\t</labelattributes>\n";
}

View File

@ -212,7 +212,7 @@ void QgsLegend::addLayer(QgsMapLayer * layer)
layer->initContextMenu(mQgisApp);
const char * layerName = layer->name().ascii(); // debugger probe
const char * layerName = layer->name(); // debugger probe
QgsLegendItem *legend_item = new QgsLegendItem(layer, this, mQgisApp->actionInOverview);

View File

@ -190,7 +190,7 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
QDomElement mne = mnl.toElement();
dataSource = mne.text();
const char * dataSourceStr = dataSource.ascii(); // debugger probe
const char * dataSourceStr = dataSource; // debugger probe
// the internal name is just the data source basename
QFileInfo dataSourceFileInfo( dataSource );
@ -201,7 +201,7 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
mne = mnl.toElement();
setLayerName( mne.text() );
const char * layerNameStr = mne.text().ascii(); // debugger probe
const char * layerNameStr = mne.text(); // debugger probe
// process zorder
mnl = layer_node.namedItem("zorder");

View File

@ -102,29 +102,29 @@ sharedLibExtension = "*.so*";
#endif //#ifdef TESTLIB
std::cout << "Examining " << txtPluginDir->text().ascii() << "/" << pluginDir[i].ascii() << std::endl;
std::cout << "Examining " << txtPluginDir->text() << "/" << pluginDir[i] << std::endl;
QLibrary *myLib = new QLibrary(txtPluginDir->text() + "/" + pluginDir[i]);
bool loaded = myLib->load();
if (loaded)
{
std::cout << "Loaded " << myLib->library().ascii() << std::endl;
std::cout << "Loaded " << myLib->library() << std::endl;
name_t *pName = (name_t *) myLib->resolve("name");
description_t *pDesc = (description_t *) myLib->resolve("description");
version_t *pVersion = (version_t *) myLib->resolve("version");
#ifdef QGISDEBUG
// show the values (or lack of) for each function
if(pName){
std::cout << "Plugin name: " << pName().ascii() << std::endl;
std::cout << "Plugin name: " << pName() << std::endl;
}else{
std::cout << "Plugin name not returned when queried\n";
}
if(pDesc){
std::cout << "Plugin description: " << pDesc().ascii() << std::endl;
std::cout << "Plugin description: " << pDesc() << std::endl;
}else{
std::cout << "Plugin description not returned when queried\n";
}
if(pVersion){
std::cout << "Plugin version: " << pVersion().ascii() << std::endl;
std::cout << "Plugin version: " << pVersion() << std::endl;
}else{
std::cout << "Plugin version not returned when queried\n";
}
@ -159,11 +159,11 @@ sharedLibExtension = "*.so*";
}
} else
{
std::cout << "Failed to get name, description, or type for " << myLib->library().ascii() << std::endl;
std::cout << "Failed to get name, description, or type for " << myLib->library() << std::endl;
}
} else
{
std::cout << "Failed to load " << myLib->library().ascii() << std::endl;
std::cout << "Failed to load " << myLib->library() << std::endl;
}
}
}

View File

@ -204,12 +204,12 @@ public:
i != sl.end();
++i )
{
qDebug( "[%s] ", (*i).ascii() );
qDebug( "[%s] ", (*i) );
}
}
else
{
qDebug( "%s", value_.toString().ascii() );
qDebug( "%s", value_.toString() );
}
}
@ -244,7 +244,7 @@ public:
if ( QString::null == typeString )
{
qDebug( "%s:%d null ``type'' attribute for %s",
__FILE__, __LINE__, keyNode.nodeName().ascii() );
__FILE__, __LINE__, keyNode.nodeName() );
return false;
}
@ -267,7 +267,7 @@ public:
{
case QVariant::Invalid :
qDebug( "%s:%d invalid value type %s .. ",
__FILE__, __LINE__, typeString.ascii() );
__FILE__, __LINE__, typeString );
return false;
@ -308,7 +308,7 @@ public:
else
{
qDebug( "qgsproject.cpp:%d non <value> element ``%s'' in string list",
__LINE__, values.item(i).nodeName().ascii() );
__LINE__, values.item(i).nodeName() );
}
++i;
@ -514,7 +514,7 @@ public:
default :
qDebug( "%s:%d unsupported value type %s .. not propertly translated to QVariant in qgsproject.cpp:%d",
__FILE__, __LINE__, typeString.ascii() );
__FILE__, __LINE__, typeString );
}
return true;
@ -696,9 +696,9 @@ public:
{
for ( QDictIterator<Property> i(properties_); i.current(); ++i )
{
qDebug( "<%s>", i.currentKey().ascii() );
qDebug( "<%s>", i.currentKey() );
i.current()->dump( );
qDebug( "</%s>", i.currentKey().ascii() );
qDebug( "</%s>", i.currentKey() );
}
}
@ -733,7 +733,7 @@ public:
else
{
qDebug( "%s:%d cannot find key %s to remove",
__FILE__, __LINE__, currentKey.ascii() );
__FILE__, __LINE__, currentKey );
return false;
}
@ -764,7 +764,7 @@ public:
if ( ! properties_[subkeys.item(i).nodeName()]->readXML( subkey ) )
{
qDebug( "%s:%d unable to parse key value %s",
__FILE__, __LINE__, subkeys.item(i).nodeName().ascii() );
__FILE__, __LINE__, subkeys.item(i).nodeName() );
}
}
else // otherwise it's a subkey, so just recurse on down the remaining keys
@ -776,7 +776,7 @@ public:
if ( ! properties_[subkeys.item(i).nodeName()]->readXML( subkey) )
{
qDebug( "%s:%d unable to parse subkey %s",
__FILE__, __LINE__, subkeys.item(i).nodeName().ascii() );
__FILE__, __LINE__, subkeys.item(i).nodeName() );
}
}
@ -960,9 +960,9 @@ dump_( QMap< QString, PropertyKey > const & property_list )
curr_scope != property_list.end();
curr_scope++ )
{
qDebug( "<%s>", curr_scope.key().ascii() );
qDebug( "<%s>", curr_scope.key() );
curr_scope.data().dump( );
qDebug( "</%s>", curr_scope.key().ascii() );
qDebug( "</%s>", curr_scope.key() );
}
} // dump_
@ -1046,9 +1046,9 @@ _getScopeProperties( QDomNode const & scopeNode,
QDomNode currentValue = currentProperty.firstChild(); // should only have one child
qDebug( "Got property %s:%s (%s)",
currentProperty.nodeName().ascii(),
currentValue.nodeValue().ascii(),
currentProperty.toElement().attributeNode("type").value().ascii() );
currentProperty.nodeName(),
currentValue.nodeValue(),
currentProperty.toElement().attributeNode("type").value() );
// the values come in as strings; we need to restore them to their
// original values *and* types
@ -1063,7 +1063,7 @@ _getScopeProperties( QDomNode const & scopeNode,
case QVariant::Invalid :
qDebug( "qgsproject.cpp:%d invalid value type %s .. ",
__LINE__,
currentProperty.toElement().attributeNode("type").value().ascii() );
currentProperty.toElement().attributeNode("type").value() );
restoredValue.clear();
@ -1211,7 +1211,7 @@ _getScopeProperties( QDomNode const & scopeNode,
default :
qDebug( "unsupported value type %s .. not propertly translated to QVariant in qgsproject.cpp:%d",
currentProperty.toElement().attributeNode("type").value().ascii(),
currentProperty.toElement().attributeNode("type").value(),
__LINE__ );
restoredValue.clear();
@ -1292,14 +1292,14 @@ _getProperties( QDomDocument const & doc, QMap< QString, PropertyKey > & project
qDebug( "found %d property node(s) for scope %s",
curr_scope_node.childNodes().count(),
curr_scope_node.nodeName().ascii() );
curr_scope_node.nodeName() );
// DEPRECATED _getScopeProperties( curr_scope_node, project_properties );
if ( ! project_properties[curr_scope_node.nodeName()].readXML( curr_scope_node ) )
{
qDebug ("%s:%d unable to read XML for property %s",
__FILE__, __LINE__, curr_scope_node.nodeName().ascii() );
__FILE__, __LINE__, curr_scope_node.nodeName() );
}
++i;
@ -1765,7 +1765,7 @@ QgsProject::read( )
imp_->file.close();
throw QgsException( errorString + " for file " + imp_->file.name().ascii() );
throw QgsException( errorString + " for file " + imp_->file.name() );
return false; // XXX superfluous because of exception
}
@ -1948,13 +1948,13 @@ QgsProject::write( )
curr_scope != imp_->properties_.end();
curr_scope++ )
{
qDebug( "scope ``%s'' has %d entries", curr_scope.key().ascii(), curr_scope.data().count() );
qDebug( "scope ``%s'' has %d entries", curr_scope.key(), curr_scope.data().count() );
// <$scope>
if ( ! curr_scope.data().writeXML( curr_scope.key(), propertiesElement, *doc ) )
{
qDebug ( "%s:%d error create property %s's DOM objects",
__FILE__, __LINE__, curr_scope.key().ascii() );
__FILE__, __LINE__, curr_scope.key() );
}
// </$scope>
@ -1970,7 +1970,7 @@ QgsProject::write( )
QString xml = doc->toString( 4 ); // write to string with indentation of four characters
// (yes, four is arbitrary)
// const char * xmlString = xml.ascii(); // debugger probe point
// const char * xmlString = xml; // debugger probe point
// qDebug( "project file output:\n\n" + xml );
QTextStream projectFileStream( &imp_->file );

View File

@ -3330,7 +3330,7 @@ bool QgsRasterLayer::readXML_( QDomNode & layer_node )
myElement = snode.toElement();
setGrayBandName(myElement.text());
const char * sourceNameStr = source().ascii(); // debugger probe
const char * sourceNameStr = source(); // debugger probe
if ( ! readFile( source() ) ) // Data source name set in
// QgsMapLayer::readXML()
@ -3357,7 +3357,7 @@ bool QgsRasterLayer::readXML_( QDomNode & layer_node )
if ( mapLayerNode.isNull() || ("maplayer" != mapLayerNode.nodeName()) )
{
const char * nn = mapLayerNode.nodeName().ascii(); // debugger probe
const char * nn = mapLayerNode.nodeName(); // debugger probe
qDebug( "QgsRasterLayer::writeXML() can't find <maplayer>" );

View File

@ -211,16 +211,16 @@ void QgsSingleSymRenderer::writeXML(std::ostream& xml)
{
xml << "\t\t<singlesymbol>\n";
xml << "\t\t\t<renderitem>\n";
xml << "\t\t\t\t<value>" << this->item()->value().ascii() << "</value>\n";
xml << "\t\t\t\t<value>" << this->item()->value() << "</value>\n";
QgsSymbol *symbol = this->item()->getSymbol();
xml << "\t\t\t\t<symbol>\n";
xml << "\t\t\t\t\t<outlinecolor red=\""
<< symbol->pen().color().red()
<< "\" green=\""
<< QString::number(symbol->pen().color().green()).ascii()
<< QString::number(symbol->pen().color().green())
<< "\" blue=\""
<< QString::number(symbol->pen().color().blue()).ascii()
<< QString::number(symbol->pen().color().blue())
<< "\" />\n";
xml << "\t\t\t\t\t<outlinestyle>" << (const char *)QgsSymbologyUtils::penStyle2QString(symbol->pen().style()) << "</outlinestyle>\n";
xml << "\t\t\t\t\t<outlinewidth>" << symbol->pen().width() << "</outlinewidth>\n";

View File

@ -46,13 +46,13 @@ QPixmap QgsSVGCache::getPixmap(QString filename, double scaleFactor) {
// if we already have the pixmap, return it
if (iter != pixmapMap.end()) {
std::cerr<<"SVGCACHE: "<<filename.ascii()<<"["<<scaleFactor
std::cerr<<"SVGCACHE: "<<filename<<"["<<scaleFactor
<<"] is already loaded"<<std::endl;
return iter->second;
}
// if not, try to load it
std::cerr<<"SVGCACHE: loading "<<filename.ascii()<<"["<<scaleFactor<<"]"<<std::endl;
std::cerr<<"SVGCACHE: loading "<<filename<<"["<<scaleFactor<<"]"<<std::endl;
QPicture pic;
pic.load(filename,"svg");
int width=pic.boundingRect().width();

View File

@ -154,26 +154,26 @@ void QgsUniqueValRenderer::writeXML(std::ostream& xml)
qWarning("in QgsUniqueValRenderer::writeXML");
#endif
xml << "\t\t<uniquevalue>\n";
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()).ascii() << "</classificationfield>\n";
xml << "\t\t\t<classificationfield>" << QString::number(this->classificationField()) << "</classificationfield>\n";
for(std::map<QString,QgsRenderItem*>::iterator it=mEntries.begin();it!=mEntries.end();++it)
{
xml << "\t\t\t<renderitem>\n";
xml << "\t\t\t\t<value>" << QString(it->first).ascii() << "</value>\n";
xml << "\t\t\t\t<value>" << QString(it->first) << "</value>\n";
xml << "\t\t\t\t<symbol>\n";
QgsSymbol *symbol = (it->second)->getSymbol();
xml << "\t\t\t\t\t<outlinecolor red=\"" << QString::number(symbol->pen().color().red()).ascii() << "\" green=\"" <<
QString::number(symbol->pen().color().green()).ascii() << "\" blue=\"" << QString::number(symbol->pen().color().blue()).ascii() <<
xml << "\t\t\t\t\t<outlinecolor red=\"" << QString::number(symbol->pen().color().red()) << "\" green=\"" <<
QString::number(symbol->pen().color().green()) << "\" blue=\"" << QString::number(symbol->pen().color().blue()) <<
"\" />\n";
xml << "\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(symbol->pen().style()).ascii() <<
xml << "\t\t\t\t\t<outlinestyle>" << QgsSymbologyUtils::penStyle2QString(symbol->pen().style()) <<
"</outlinestyle>\n";
xml << "\t\t\t\t\t<outlinewidth>" << QString::number(symbol->pen().width()).ascii() << "</outlinewidth>\n";
xml << "\t\t\t\t\t<fillcolor red=\"" << QString::number(symbol->brush().color().red()).ascii() << "\" green=\"" <<
QString::number(symbol->brush().color().green()).ascii() << "\" blue=\"" <<
QString::number(symbol->brush().color().blue()).ascii() << "\" />\n";
xml << "\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(symbol->brush().style()).ascii() <<
xml << "\t\t\t\t\t<outlinewidth>" << QString::number(symbol->pen().width()) << "</outlinewidth>\n";
xml << "\t\t\t\t\t<fillcolor red=\"" << QString::number(symbol->brush().color().red()) << "\" green=\"" <<
QString::number(symbol->brush().color().green()) << "\" blue=\"" <<
QString::number(symbol->brush().color().blue()) << "\" />\n";
xml << "\t\t\t\t\t<fillpattern>" << QgsSymbologyUtils::brushStyle2QString(symbol->brush().style()) <<
"</fillpattern>\n";
xml << "\t\t\t\t</symbol>\n";
xml << "\t\t\t\t<label>" << (it->second)->label().ascii() << "</label>\n";
xml << "\t\t\t\t<label>" << (it->second)->label() << "</label>\n";
#ifdef QGISDEBUG
qWarning((it->second)->label());
#endif

View File

@ -452,7 +452,7 @@ int QgsVectorLayer::endian()
for (int i = 0; i < attr.size(); i++)
{
#ifdef QGISDEBUG
std::cout << attr[i].fieldName().ascii() << " == " << fieldIndex.ascii() << std::endl;
std::cout << attr[i].fieldName() << " == " << fieldIndex << std::endl;
#endif
if (attr[i].fieldName().lower() == fieldIndex)
{
@ -1578,7 +1578,7 @@ QgsVectorLayer:: setDataProvider( QString const & provider )
if ( mapLayerNode.isNull() || ("maplayer" != mapLayerNode.nodeName()) )
{
const char * nn = mapLayerNode.nodeName().ascii(); // debugger probe
const char * nn = mapLayerNode.nodeName(); // debugger probe
qDebug( "QgsVectorLayer::writeXML() can't find <maplayer>" );