toAscii/fromAscii -> toLatin1/fromLatin1

parent 9037e6b4
......@@ -316,13 +316,13 @@ void MainWindow::startUpload()
platform += "_x64";
#endif
fields << Field("Platform", platform.toAscii());
fields << Field("Platform", platform.toLatin1());
#endif
#ifdef Q_WS_X11
fields << Field("Platform", "Linux/X11");
#endif
#ifdef Q_WS_MAC
fields << Field("Platform", platformToStringMac(QSysInfo::MacintoshVersion).toAscii());
fields << Field("Platform", platformToStringMac(QSysInfo::MacintoshVersion).toLatin1());
#endif
QFile f(QDesktopServices::storageLocation(QDesktopServices::TempLocation) + "/krita-opengl.txt");
......@@ -345,7 +345,7 @@ void MainWindow::startUpload()
QString dumpfile = m_d->dumpPath + "/" + m_d->id + ".dmp";
qDebug() << "dumpfile" << dumpfile;
body += "Content-Disposition: form-data; name=\"upload_file_minidump\"; filename=\""
+ QFileInfo(dumpfile).fileName().toAscii() + "\"\r\n";
+ QFileInfo(dumpfile).fileName().toLatin1() + "\"\r\n";
body += "Content-Type: application/octet-stream\r\n\r\n";
QFile file(dumpfile);
if (file.exists()) {
......
......@@ -82,7 +82,7 @@ void KisPropertiesConfiguration::fromXML(const QDomElement& e)
QString value = e.text();
if(type == "bytearray")
{
d->properties[name] = QVariant(QByteArray::fromBase64(value.toAscii()));
d->properties[name] = QVariant(QByteArray::fromBase64(value.toLatin1()));
}
else
d->properties[name] = value;
......@@ -122,7 +122,7 @@ void KisPropertiesConfiguration::toXML(QDomDocument& doc, QDomElement& root) con
text = doc.createCDATASection(v.toString()); // XXX: Unittest this!
type = "string";
} else if(v.type() == QVariant::ByteArray ) {
text = doc.createTextNode(QString::fromAscii(v.toByteArray().toBase64())); // Arbitary Data
text = doc.createTextNode(QString::fromLatin1(v.toByteArray().toBase64())); // Arbitary Data
type = "bytearray";
} else {
text = doc.createTextNode(v.toString());
......
......@@ -124,7 +124,7 @@ QStringList Command::breakIntoTokens(const QString &line, bool &lastTokenEnclose
// Type separators '()' can be replaced by '[]' or '{}' if necessary ...
QChar delimiter = line.at(index);
QChar closingdelimiter;
switch (delimiter.toAscii())
switch (delimiter.toLatin1())
{
case '(':
{
......
......@@ -131,7 +131,7 @@ bool ResourceBundleManifest::load(QIODevice *device)
// Only if fullPath is valid, should we store this entry.
// If not, we don't bother to find out exactly what is wrong, we just skip it.
if (!fullPath.isNull() && !mediaType.isEmpty() && !md5sum.isEmpty()) {
addResource(mediaType, fullPath, tagList, QByteArray::fromHex(md5sum.toAscii()));
addResource(mediaType, fullPath, tagList, QByteArray::fromHex(md5sum.toLatin1()));
}
}
......
......@@ -238,7 +238,7 @@ bool DocumentManager::save()
void DocumentManager::saveAs(const QString &filename, const QString &mimetype)
{
d->document->setOutputMimeType(mimetype.toAscii());
d->document->setOutputMimeType(mimetype.toLatin1());
d->saveAsFilename = filename;
// Yes. This is a massive hack. Basically, we need to wait a little while, to ensure
// the save call happens late enough for a variety of UI things to happen first.
......
......@@ -30,12 +30,12 @@ PropertyContainer::~PropertyContainer()
void PropertyContainer::writeProperty(QString name, QVariant value)
{
setProperty(name.toAscii(), value);
setProperty(name.toLatin1(), value);
}
QVariant PropertyContainer::readProperty(QString name)
{
return property(name.toAscii());
return property(name.toLatin1());
}
const KisCubicCurve& PropertyContainer::curve() const
......
......@@ -173,7 +173,7 @@ QObject* FiltersModel::configuration(int index)
QMap<QString, QVariant>::const_iterator i;
for(i = props.constBegin(); i != props.constEnd(); ++i)
{
config->setProperty(i.key().toAscii(), i.value());
config->setProperty(i.key().toLatin1(), i.value());
}
config->setCurve(d->configurations[index]->curve());
config->setCurves(d->configurations[index]->curves());
......
......@@ -985,7 +985,7 @@ QObject* LayerModel::activeFilterConfig() const
PropertyContainer* config = new PropertyContainer(filterId, 0);
QMap<QString, QVariant>::const_iterator i;
for(i = props.constBegin(); i != props.constEnd(); ++i) {
config->setProperty(i.key().toAscii(), i.value());
config->setProperty(i.key().toLatin1(), i.value());
//qDebug() << "Getting active config..." << i.key() << i.value();
}
return config;
......@@ -1004,7 +1004,7 @@ void LayerModel::setActiveFilterConfig(QObject* newConfig)
QMap<QString, QVariant>::const_iterator i;
for(i = realConfig->getProperties().constBegin(); i != realConfig->getProperties().constEnd(); ++i)
{
realConfig->setProperty(QString(i.key()), config->property(i.key().toAscii()));
realConfig->setProperty(i.key(), config->property(i.key().toLatin1()));
//qDebug() << "Creating config..." << i.key() << i.value();
}
// The following code causes sporadic crashes, and disabling causes leaks. So, leaks it must be, for now.
......
......@@ -967,11 +967,10 @@ KisImageBuilder_Result KisPNGConverter::buildFile(QIODevice* iodevice, KisImageW
const KoColorProfile* colorProfile = device->colorSpace()->profile();
QByteArray colorProfileData = colorProfile->rawData();
if (!sRGB || options.saveSRGBProfile) {
QString t ("icc");
#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 5
png_set_iCCP(png_ptr, info_ptr, t.toAscii().data(), PNG_COMPRESSION_TYPE_BASE, (const png_bytep)colorProfileData.constData(), colorProfileData . size());
png_set_iCCP(png_ptr, info_ptr, (char*)"icc", PNG_COMPRESSION_TYPE_BASE, (const png_bytep)colorProfileData.constData(), colorProfileData . size());
#else
png_set_iCCP(png_ptr, info_ptr, t.toAscii().data(), PNG_COMPRESSION_TYPE_BASE, (char*)colorProfileData.constData(), colorProfileData . size());
png_set_iCCP(png_ptr, info_ptr, (char*)"icc", PNG_COMPRESSION_TYPE_BASE, (char*)colorProfileData.constData(), colorProfileData . size());
#endif
}
......
......@@ -117,7 +117,7 @@ bool KoPattern::loadFromDevice(QIODevice *dev)
}
else {
QImage image;
result = image.load(dev, fileExtension.toUpper().toAscii());
result = image.load(dev, fileExtension.toUpper().toLatin1());
setPatternImage(image);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment