Commit d205dbe9 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Make getPropertyLazy() work for strings

parent f9154f5b
......@@ -120,6 +120,10 @@ public:
return value.isValid() ? value.value<T>() : defaultValue;
}
QString getPropertyLazy(const QString & name, const char *defaultValue) const {
return getPropertyLazy(name, QString(defaultValue));
}
int getInt(const QString & name, int def = 0) const;
double getDouble(const QString & name, double def = 0.0) const;
......
......@@ -82,7 +82,7 @@ KisPropertiesConfigurationSP KisAnimationRenderingOptions::toProperties() const
void KisAnimationRenderingOptions::fromProperties(KisPropertiesConfigurationSP config)
{
basename = config->getPropertyLazy("basename", basename);
lastDocuemntPath = config->getPropertyLazy("last_document_path", QString());
lastDocuemntPath = config->getPropertyLazy("last_document_path", "");
directory = config->getPropertyLazy("directory", directory);
firstFrame = config->getPropertyLazy("first_frame", 0);
lastFrame = config->getPropertyLazy("last_frame", 0);
......@@ -93,13 +93,13 @@ void KisAnimationRenderingOptions::fromProperties(KisPropertiesConfigurationSP c
shouldEncodeVideo = config->getPropertyLazy("encode_video", false);
shouldDeleteSequence = config->getPropertyLazy("delete_sequence", false);
ffmpegPath = config->getPropertyLazy("ffmpeg_path", QString());
ffmpegPath = config->getPropertyLazy("ffmpeg_path", "");
frameRate = config->getPropertyLazy("framerate", 25);
height = config->getPropertyLazy("height", 0);
width = config->getPropertyLazy("width", 0);
includeAudio = config->getPropertyLazy("include_audio", true);
videoFileName = config->getPropertyLazy("filename", QString());
customFFMpegOptions = config->getPropertyLazy("custom_ffmpeg_options", QString());
videoFileName = config->getPropertyLazy("filename", "");
customFFMpegOptions = config->getPropertyLazy("custom_ffmpeg_options", "");
frameExportConfig = new KisPropertiesConfiguration();
frameExportConfig->setPrefixedProperties("frame_export/", frameExportConfig);
......
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