r21939 by craig - Some code cleaning, mostly courtesy of clazy, part 5
scribus-commit
scribus-commit at lists.scribus.net
Thu Apr 20 15:06:46 UTC 2017
Author: craig
Date: Thu Apr 20 15:06:46 2017
New Revision: 21939
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21939
Log:
Some code cleaning, mostly courtesy of clazy, part 5
Modified:
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/collect4output.cpp
trunk/Scribus/scribus/fonts/scface_ps.h
trunk/Scribus/scribus/iconmanager.cpp
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
trunk/Scribus/scribus/latexhelpers.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pluginmanager.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/scpaths.cpp
trunk/Scribus/scribus/tablecell.cpp
trunk/Scribus/scribus/ui/prefs_spelling.cpp
trunk/Scribus/scribus/ui/preview.cpp
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/resourcemanager.cpp
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Thu Apr 20 15:06:46 2017
@@ -2504,7 +2504,7 @@
}
gx -= m_doc->rulerXoffset;
gy -= m_doc->rulerYoffset;
- QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(gx, m_doc->unitIndex(), true, true)).arg(value2String(gy, m_doc->unitIndex(), true, true)), this);
+ QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(gx, m_doc->unitIndex(), true, true), value2String(gy, m_doc->unitIndex(), true, true)), this);
}
void Canvas::displayCorrectedSingleHUD(QPoint m, double val, bool isX)
@@ -2532,7 +2532,7 @@
{
if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
- QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, m_doc->unitIndex(), true, true)), this);
+ QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
}
void Canvas::displaySizeHUD(QPoint m, double x, double y, bool isLine)
@@ -2540,9 +2540,9 @@
if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
return;
if (isLine)
- QToolTip::showText(m + QPoint(5, 5), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, SC_DEGREES, true, true)), this);
+ QToolTip::showText(m + QPoint(5, 5), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, SC_DEGREES, true, true)), this);
else
- QToolTip::showText(m + QPoint(5, 5), tr("Width: %1\nHeight: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, m_doc->unitIndex(), true, true)), this);
+ QToolTip::showText(m + QPoint(5, 5), tr("Width: %1\nHeight: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
}
void Canvas::displayRotHUD(QPoint m, double rot)
Modified: trunk/Scribus/scribus/collect4output.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/collect4output.cpp
==============================================================================
--- trunk/Scribus/scribus/collect4output.cpp (original)
+++ trunk/Scribus/scribus/collect4output.cpp Thu Apr 20 15:06:46 2017
@@ -61,7 +61,6 @@
bool CollectForOutput::newDirDialog()
{
- QString curDir = QDir::currentPath();
if (ScCore->usingGUI())
{
QString wdir = ".";
@@ -470,7 +469,6 @@
ProfilesL::Iterator itend = docProfiles.end();
for (ProfilesL::Iterator it = docProfiles.begin(); it != itend; ++it)
{
- QString profileName(it.key());
QString oldFile(it.value());
QString outFile(m_outputDirectory + "profiles/" + QFileInfo(oldFile).fileName());
bool success = copyFileAtomic(oldFile, outFile);
Modified: trunk/Scribus/scribus/fonts/scface_ps.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/fonts/scface_ps.h
==============================================================================
--- trunk/Scribus/scribus/fonts/scface_ps.h (original)
+++ trunk/Scribus/scribus/fonts/scface_ps.h Thu Apr 20 15:06:46 2017
@@ -120,11 +120,11 @@
{
QByteArray bb;
RawData(bb);
- QString tmp2 = "";
+// QString tmp2 = "";
if ((bb.size() > 2) && (bb[0] == char(0x80)) && (static_cast<int>(bb[1]) == 1))
{
- QString tmp3="";
- QString tmp4 = "";
+// QString tmp3="";
+// QString tmp4 = "";
int posi,cxxc=0;
for (posi = 6; posi < bb.size(); ++posi)
{
Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp (original)
+++ trunk/Scribus/scribus/iconmanager.cpp Thu Apr 20 15:06:46 2017
@@ -102,7 +102,7 @@
if ( !xmlData.setContent( data, &errorMsg, &eline, &ecol ))
{
qDebug()<<data<<errorMsg<<eline<<ecol;
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
@@ -271,16 +271,16 @@
QString IconManager::pathForIcon(const QString nam)
{
- QString iconset(PrefsManager::instance()->appPrefs.uiPrefs.iconSet);
+ //QString iconset(PrefsManager::instance()->appPrefs.uiPrefs.iconSet);
QString iconSubdir(m_iconSets[m_activeSetBasename].path+"/");
QString primaryIconSubdir(m_iconSets[m_backupSetBasename].path+"/");
- QString iconFilePath(QString("%1%2%3").arg(ScPaths::instance().iconDir()).arg(iconSubdir).arg(nam));
+ QString iconFilePath(QString("%1%2%3").arg(ScPaths::instance().iconDir(), iconSubdir, nam));
if (QFile::exists(iconFilePath))
return iconFilePath;
qWarning("pathForIcon: Unable to load icon %s: File not found", iconFilePath.toLatin1().constData());
- iconFilePath=QString("%1%2%3").arg(ScPaths::instance().iconDir()).arg(primaryIconSubdir).arg(nam);
+ iconFilePath=QString("%1%2%3").arg(ScPaths::instance().iconDir(), primaryIconSubdir, nam);
if (QFile::exists(iconFilePath))
{
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp Thu Apr 20 15:06:46 2017
@@ -1161,7 +1161,7 @@
{
QString fontName = m_fontMap[m_currentFontID];
textFont = QFont(fontName, m_currentTextSize);
- QFontInfo inf(textFont);
+// QFontInfo inf(textFont);
// qDebug() << "Using Font" << inf.family() << "for" << fontName;
}
textFont.setPixelSize(m_currentTextSize);
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp Thu Apr 20 15:06:46 2017
@@ -1180,7 +1180,7 @@
short channelType;
uchar blendKey[4];
uchar opacity, clipping, flags, filler;
- QString layerName, blend;
+ QString blend;
layerInfo.clear();
Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp (original)
+++ trunk/Scribus/scribus/latexhelpers.cpp Thu Apr 20 15:06:46 2017
@@ -258,8 +258,8 @@
{
if (!itemstab)
formatError("Found <item> in a 'settings'-tab!");
- QString value = xml.attributes().value("value").toString();
- QString img = xml.attributes().value("image").toString();
+// QString value = xml.attributes().value("value").toString();
+// QString img = xml.attributes().value("image").toString();
text = xml.readI18nText();
}
else if (xml.name() == "comment" || xml.name() == "font"
@@ -267,7 +267,7 @@
|| xml.name() == "text" || xml.name() == "list")
{
//TODO: Store this + attributes in a list
- QString tagname = xml.name().toString();
+// QString tagname = xml.name().toString();
name = xml.attributes().value("name").toString();
default_value = xml.attributes().value("default").toString();
if (xml.name() != "list")
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Apr 20 15:06:46 2017
@@ -2563,7 +2563,7 @@
AutoName=false;
if (UndoManager::undoEnabled())
{
- SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(oldName).arg(newName));
+ SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(oldName, newName));
ss->set("OLD_NAME", oldName);
ss->set("NEW_NAME", newName);
undoManager->action(this, ss);
@@ -3678,7 +3678,7 @@
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::SetFill,
- QString(Um::ColorFromTo).arg(fillColorVal).arg(tmp),
+ QString(Um::ColorFromTo).arg(fillColorVal, tmp),
Um::IFill);
ss->set("FILL");
ss->set("OLD_FILL", fillColorVal);
@@ -3780,7 +3780,7 @@
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::SetLineColor,
- QString(Um::ColorFromTo).arg(lineColorVal).arg(tmp),
+ QString(Um::ColorFromTo).arg(lineColorVal, tmp),
Um::IFill);
ss->set("LINE_COLOR");
ss->set("OLD_COLOR", lineColorVal);
@@ -4086,8 +4086,7 @@
QString oldStyle = NamedLStyle.isEmpty() ? Um::NoStyle : NamedLStyle;
QString nStyle = newStyle.isEmpty() ? Um::NoStyle : newStyle;
QString action = newStyle.isEmpty() ? Um::NoLineStyle : Um::CustomLineStyle;
- SimpleState *ss = new SimpleState(action,
- QString(Um::FromTo).arg(oldStyle).arg(nStyle),Um::ILineStyle);
+ SimpleState *ss = new SimpleState(action, QString(Um::FromTo).arg(oldStyle, nStyle), Um::ILineStyle);
ss->set("CUSTOM_LINE_STYLE");
ss->set("OLD_STYLE", NamedLStyle);
ss->set("NEW_STYLE", newStyle);
@@ -4202,7 +4201,7 @@
QString to = freeScale ? Um::FreeScaling : Um::FrameSize;
to += ", ";
to += keepRatio ? Um::KeepRatio : Um::BreakRatio;
- SimpleState *ss = new SimpleState(Um::ImageScaling, QString(Um::FromTo).arg(from).arg(to), Um::IImageScaling);
+ SimpleState *ss = new SimpleState(Um::ImageScaling, QString(Um::FromTo).arg(from, to), Um::IImageScaling);
ss->set("SCALE_MODE");
if (freeScale != ScaleType)
{
@@ -4697,8 +4696,7 @@
QString oyString = QString::number(oldYpos * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nxString = QString::number(m_xPos * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nyString = QString::number(m_yPos * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
- QString tooltip = QString(Um::MoveFromTo).arg(oxString).arg(oyString).arg(oldp)
- .arg(nxString).arg(nyString).arg(newp);
+ QString tooltip = QString(Um::MoveFromTo).arg(oxString, oyString, oldp, nxString, nyString, newp);
SimpleState *ss = new SimpleState(Um::Move, tooltip, Um::IMove);
ss->set("ITEM_MOVE");
ss->set("OLD_XPOS", oldXpos);
@@ -4731,7 +4729,7 @@
QString ohString = QString::number(oldHeight * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nwString = QString::number(m_width * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nhString = QString::number(m_height * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
- QString tooltip = QString(Um::ResizeFromTo).arg(owString).arg(ohString).arg(nwString).arg(nhString);
+ QString tooltip = QString(Um::ResizeFromTo).arg(owString, ohString, nwString, nhString);
SimpleState *ss = new SimpleState(Um::Resize, tooltip, Um::IResize);
ss->set("ITEM_RESIZE");
if (!isNoteFrame() || !asNoteFrame()->isAutoWidth())
@@ -4820,7 +4818,7 @@
QString olyString = QString::number(oldLocalY * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nlxString = QString::number(m_imageXOffset * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString nlyString = QString::number(m_imageYOffset * unitRatio, 'f', unitPrecision) + " " + unitSuffix;
- QString tooltip = QString(Um::ImageOffsetFromTo).arg(olxString).arg(olyString).arg(nlxString).arg(nlyString);
+ QString tooltip = QString(Um::ImageOffsetFromTo).arg(olxString, olyString, nlxString, nlyString);
SimpleState *ss = new SimpleState(Um::ImageOffset, tooltip, Um::IMove);
ss->set("IMAGE_OFFSET");
ss->set("OLD_IMAGEXOFFSET", oldLocalX);
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Thu Apr 20 15:06:46 2017
@@ -113,7 +113,6 @@
htmlText.append( tr("Actual PPI:") + " " + QString::number(qRound(72.0 / imageXScale()))+" x "+ QString::number(qRound(72.0 / imageYScale())) + "\n");
htmlText.append( tr("Size:") + " " + QString::number(OrigW) + " x " + QString::number(OrigH) + "\n");
htmlText.append( tr("Colorspace:") + " ");
- QString cSpace;
QString ext = fi.suffix().toLower();
if ((extensionIndicatesPDF(ext) || extensionIndicatesEPSorPS(ext)) && (pixm.imgInfo.type != ImageType7))
htmlText.append( tr("Unknown"));
@@ -486,7 +485,6 @@
htmlText.append( tr("Original PPI:") + " " + QString::number(pixm.imgInfo.xres)+" x "+QString::number(pixm.imgInfo.yres) + "<br/>");
htmlText.append( tr("Actual PPI:") + " " + QString::number(qRound(72.0 / imageXScale()))+" x "+ QString::number(qRound(72.0 / imageYScale())) + "<br/>");
htmlText.append( tr("Colorspace:") + " ");
- QString cSpace;
QString ext = fi.suffix().toLower();
if ((extensionIndicatesPDF(ext) || extensionIndicatesEPSorPS(ext)) && (pixm.imgInfo.type != ImageType7))
htmlText.append( tr("Unknown"));
Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp (original)
+++ trunk/Scribus/scribus/pluginmanager.cpp Thu Apr 20 15:06:46 2017
@@ -146,7 +146,7 @@
int PluginManager::initPlugin(const QString fileName)
{
PluginData pda;
- pda.pluginFile = QString("%1/%2").arg(ScPaths::instance().pluginDir()).arg(fileName);
+ pda.pluginFile = QString("%1/%2").arg(ScPaths::instance().pluginDir(), fileName);
pda.pluginName = getPluginName(pda.pluginFile);
if (pda.pluginName.isNull())
// Couldn't determine plugname from filename. We've already complained, so
@@ -270,13 +270,9 @@
else
failReason = tr("unknown plugin type", "plugin load error");
if (pda.enabled || isActionPlugin)
- ScCore->setSplashStatus(
- tr("Plugin: %1 loaded", "plugin manager")
- .arg(pda.plugin->fullTrName()));
+ ScCore->setSplashStatus(tr("Plugin: %1 loaded", "plugin manager").arg(pda.plugin->fullTrName()));
else
- ScCore->setSplashStatus(
- tr("Plugin: %1 failed to load: %2", "plugin manager")
- .arg(pda.plugin->fullTrName()).arg(failReason));
+ ScCore->setSplashStatus(tr("Plugin: %1 failed to load: %2", "plugin manager").arg(pda.plugin->fullTrName(), failReason));
}
bool PluginManager::setupPluginActions(ScribusMainWindow *mw)
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Thu Apr 20 15:06:46 2017
@@ -1897,8 +1897,7 @@
QFile f(ho);
if(!f.open(QIODevice::WriteOnly))
{
- m_lastError = tr("Could not open preferences file \"%1\" for writing: %2")
- .arg(ho).arg(qApp->translate("QFile",f.errorString().toLatin1().constData()));
+ m_lastError = tr("Could not open preferences file \"%1\" for writing: %2").arg(ho, qApp->translate("QFile",f.errorString().toLatin1().constData()));
}
else
{
@@ -1908,9 +1907,7 @@
if (f.error()==QFile::NoError)
result = true;
else
- m_lastError = tr("Writing to preferences file \"%1\" failed: "
- "QIODevice status code %2")
- .arg(ho).arg(f.errorString());
+ m_lastError = tr("Writing to preferences file \"%1\" failed: QIODevice status code %2").arg(ho, f.errorString());
}
if (f.isOpen())
f.close();
@@ -1923,8 +1920,7 @@
QFile f(ho);
if(!f.open(QIODevice::ReadOnly))
{
- m_lastError = tr("Failed to open prefs file \"%1\": %2")
- .arg(ho).arg( qApp->translate("QFile",f.errorString().toLatin1().constData()) );
+ m_lastError = tr("Failed to open prefs file \"%1\": %2").arg(ho, qApp->translate("QFile",f.errorString().toLatin1().constData()) );
return false;
}
QTextStream ts(&f);
@@ -1933,8 +1929,7 @@
int errorLine = 0, errorColumn = 0;
if( !docu.setContent(ts.readAll(), &errorMsg, &errorLine, &errorColumn) )
{
- m_lastError = tr("Failed to read prefs XML from \"%1\": %2 at line %3, col %4")
- .arg(ho).arg(errorMsg).arg(errorLine).arg(errorColumn);
+ m_lastError = tr("Failed to read prefs XML from \"%1\": %2 at line %3, col %4").arg(ho).arg(errorMsg).arg(errorLine).arg(errorColumn);
f.close();
return false;
}
Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp (original)
+++ trunk/Scribus/scribus/scpaths.cpp Thu Apr 20 15:06:46 2017
@@ -254,7 +254,6 @@
QStringList ScPaths::spellDirs() const
{
- //dictionaryPaths
QDir d;
QStringList spellDirs;
spellDirs.append(userDictDir(ScPaths::Spell, false));
@@ -320,21 +319,15 @@
QStringList ScPaths::hyphDirs() const
{
- //dictionaryPaths
+ QDir d;
+ QStringList hyphDirs;
+ hyphDirs.append(userDictDir(ScPaths::Hyph, false));
+ hyphDirs.append(m_shareDir + "dicts/hyph/");
+#ifdef Q_OS_MAC
QString macPortsPath("/opt/local/share/hunspell/");
QString finkPath("/sw/share/hunspell/");
QString osxLibreOfficePath("/Applications/LibreOffice.app/Contents/Resources/extensions");
QString osxUserLibreOfficePath(QDir::homePath()+"/Applications/LibreOffice.app/Contents/Resources/extensions");
- QString linuxLocalPath("/usr/local/share/hunspell/");
- QString linuxHunspellPath("/usr/share/hunspell/");
- QString linuxMyspellPath("/usr/share/myspell/");
- QString linuxHyphen1Path("/usr/share/hyphen/");
- QString windowsLOPath("LibreOffice 3.5/share/extensions");
- QDir d;
- QStringList hyphDirs;
- hyphDirs.append(userDictDir(ScPaths::Hyph, false));
- hyphDirs.append(m_shareDir + "dicts/hyph/");
-#ifdef Q_OS_MAC
d.setPath(macPortsPath);
if (d.exists())
hyphDirs.append(macPortsPath);
@@ -361,6 +354,7 @@
}
#elif defined(_WIN32)
+ QString windowsLOPath("LibreOffice 3.5/share/extensions");
QString progFiles = windowsSpecialDir(CSIDL_PROGRAM_FILES);
d.setPath(progFiles+windowsLOPath);
if (d.exists())
@@ -372,6 +366,10 @@
hyphDirs.append(progFiles+windowsLOPath + "/" + dir + "/");
}
#elif defined(Q_OS_LINUX)
+ QString linuxLocalPath("/usr/local/share/hunspell/");
+ QString linuxHunspellPath("/usr/share/hunspell/");
+ QString linuxMyspellPath("/usr/share/myspell/");
+ QString linuxHyphen1Path("/usr/share/hyphen/");
d.setPath(linuxHyphen1Path);
if (d.exists())
hyphDirs.append(linuxHyphen1Path);
Modified: trunk/Scribus/scribus/tablecell.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/tablecell.cpp
==============================================================================
--- trunk/Scribus/scribus/tablecell.cpp (original)
+++ trunk/Scribus/scribus/tablecell.cpp Thu Apr 20 15:06:46 2017
@@ -161,8 +161,8 @@
QString str("cell(");
str += QString("row=%1, column=%2, ").arg(row()).arg(column());
str += QString("rowSpan=%1, columnSpan=%2, ").arg(rowSpan()).arg(columnSpan());
- str += QString("leftBorder=%1, rightBorder=%2, ").arg(leftBorder().asString()).arg(rightBorder().asString());
- str += QString("topBorder=%1, bottomBorder=%2, ").arg(topBorder().asString()).arg(bottomBorder().asString());
+ str += QString("leftBorder=%1, rightBorder=%2, ").arg(leftBorder().asString(), rightBorder().asString());
+ str += QString("topBorder=%1, bottomBorder=%2, ").arg(topBorder().asString(), bottomBorder().asString());
str += QString("leftPadding=%1, rightPadding=%2, ").arg(leftPadding()).arg(rightPadding());
str += QString("topPadding=%1, bottomPadding=%2, ").arg(topPadding()).arg(bottomPadding());
str += QString("style=%1").arg(d->style.asString());
Modified: trunk/Scribus/scribus/ui/prefs_spelling.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/ui/prefs_spelling.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_spelling.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_spelling.cpp Thu Apr 20 15:06:46 2017
@@ -250,7 +250,7 @@
dataFile.close();
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<availDictsXMLDataFile;
Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp (original)
+++ trunk/Scribus/scribus/ui/preview.cpp Thu Apr 20 15:06:46 2017
@@ -78,7 +78,6 @@
setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
Q_ASSERT(!docu->masterPageMode());
prefsManager=PrefsManager::instance();
- QString tmp;
postscriptPreview = usePostscriptPreview(printer, engine);
QString caption = tr("Print Preview");
#ifdef _WIN32
@@ -527,7 +526,7 @@
int PPreview::RenderPreview(int Seite, int Res)
{
int ret = -1;
- QString cmd1, cmd2, cmd3;
+ QString cmd1;
QMap<QString,QMap<uint, FPointArray> > ReallyUsed;
#if defined _WIN32
if (!postscriptPreview)
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Thu Apr 20 15:06:46 2017
@@ -73,7 +73,6 @@
BleedTop->setMaximum(3000*unitRatio);
previewButton->setEnabled(!previewDinUse);
// Fill printer list
- QString Pcap;
QString printerName;
QStringList printerNames = PrinterUtil::getPrinterNames();
int numPrinters = printerNames.count();
Modified: trunk/Scribus/scribus/ui/resourcemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21939&path=/trunk/Scribus/scribus/ui/resourcemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/resourcemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/resourcemanager.cpp Thu Apr 20 15:06:46 2017
@@ -124,7 +124,7 @@
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
// qDebug()<<errorMsg<<eline<<ecol;
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
@@ -183,7 +183,7 @@
dataFile.close();
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
@@ -242,7 +242,7 @@
dataFile.close();
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
@@ -559,7 +559,7 @@
dataFile.close();
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
@@ -660,7 +660,7 @@
dataFile.close();
if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
{
- if (data.toLower().contains("404 not found"))
+ if (data.contains("404 not found", Qt::CaseInsensitive))
qDebug()<<"File not found on server";
else
qDebug()<<"Could not open file"<<dataFile.fileName();
More information about the scribus-commit
mailing list