r15411 by craig - #9307: Fix incorrect usage of config file name as index to fix render frames
scribus-commit
scribus-commit at lists.scribus.net
Thu Aug 12 00:01:53 CEST 2010
Author: craig
Date: Wed Aug 11 22:01:53 2010
New Revision: 15411
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15411
Log:
#9307: Fix incorrect usage of config file name as index to fix render frames
Modified:
trunk/Scribus/scribus/latexhelpers.cpp
trunk/Scribus/scribus/pageitem_latexframe.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/prefsmanager.h
Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15411&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp (original)
+++ trunk/Scribus/scribus/latexhelpers.cpp Wed Aug 11 22:01:53 2010
@@ -288,7 +288,9 @@
QString LatexConfigParser::executable() const
{
- QString command = PrefsManager::instance()->latexCommands()[m_filename];
+ QFileInfo f(m_filename);
+ QString fileName=f.fileName();
+ QString command = PrefsManager::instance()->latexCommands()[fileName];
if (command.isEmpty()) {
return m_executable;
} else {
Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15411&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Wed Aug 11 22:01:53 2010
@@ -55,10 +55,8 @@
setConfigFile(PrefsManager::instance()->latexConfigs()[0]);
latex = new QProcess();
- connect(latex, SIGNAL(finished(int, QProcess::ExitStatus)),
- this, SLOT(updateImage(int, QProcess::ExitStatus)));
- connect(latex, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(latexError(QProcess::ProcessError)));
+ connect(latex, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(updateImage(int, QProcess::ExitStatus)));
+ connect(latex, SIGNAL(error(QProcess::ProcessError)), this, SLOT(latexError(QProcess::ProcessError)));
latex->setProcessChannelMode(QProcess::MergedChannels);
QTemporaryFile *tempfile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_render_XXXXXX");
@@ -261,7 +259,6 @@
}
QString full_command = config->executable();
-
if (full_command.isEmpty()) {
err = 0xffff;
update(); //Show error marker
@@ -458,12 +455,15 @@
void PageItem_LatexFrame::setConfigFile(QString newConfig, bool relative)
{
// Try to interpret a config file as a relative path even when it is given with a full path
- if (relative) {
+ if (relative)
+ {
QFileInfo fi;
QStringList configs = PrefsManager::instance()->latexConfigs();
- foreach (QString config, configs) {
+ foreach (QString config, configs)
+ {
fi.setFile(config);
- if (newConfig == fi.fileName()) {
+ if (newConfig == fi.fileName())
+ {
newConfig = config;
break;
}
@@ -479,7 +479,6 @@
configFilename = newConfig;
config = LatexConfigCache::instance()->parser(configFilename);
-
//Initialize with default values
QString key;
QMapIterator<QString, QString> i(config->properties);
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15411&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Wed Aug 11 22:01:53 2010
@@ -986,6 +986,12 @@
appPrefs.extToolPrefs.latexConfigs=configs;
}
+void PrefsManager::setLatexCommands(const QMap<QString, QString>& commands)
+{
+ appPrefs.extToolPrefs.latexCommands=commands;
+}
+
+
void PrefsManager::setLatexEditorExecutable(const QString& executableName)
{
appPrefs.extToolPrefs.latexEditorExecutable=executableName;
Modified: trunk/Scribus/scribus/prefsmanager.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15411&path=/trunk/Scribus/scribus/prefsmanager.h
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.h (original)
+++ trunk/Scribus/scribus/prefsmanager.h Wed Aug 11 22:01:53 2010
@@ -127,7 +127,7 @@
void setExtBrowserExecutable(const QString&);
void setUniconvExecutable(const QString&);
void setLatexConfigs(const QStringList&);
- void setLatexCommands(const QMap<QString, QString>& commands) { appPrefs.extToolPrefs.latexCommands=commands; }
+ void setLatexCommands(const QMap<QString, QString>& commands);
void setLatexEditorExecutable(const QString&);
QString ghostscriptExecutable() const {return appPrefs.extToolPrefs.gs_exe;};
QString imageEditorExecutable() const {return appPrefs.extToolPrefs.imageEditorExecutable;};
More information about the scribus-commit
mailing list