Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 698bd746 authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral where necessary

parent a4230e44
......@@ -84,19 +84,19 @@ int main(int argc, char **argv)
if (vprepos >= 0) {
vpre=args.at(vprepos);
}
QStringList vprelist = vpre.remove(QLatin1String("vpre=")).split(QLatin1Char(','));
QStringList vprelist = vpre.remove(QStringLiteral("vpre=")).split(QLatin1Char(','));
if (vprelist.size() > 0) {
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")), QString::fromLatin1("vpre=%1").arg(vprelist.at(0)));
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")), QStringLiteral("vpre=%1").arg(vprelist.at(0)));
}
if (args.contains(QLatin1String("pass=2"))) {
if (args.contains(QStringLiteral("pass=2"))) {
// dual pass encoding
dualpass = true;
doerase = false;
args.replace(args.indexOf(QLatin1String("pass=2")), QLatin1String("pass=1"));
if (args.contains(QLatin1String("vcodec=libx264"))) args << QString::fromLatin1("passlogfile=%1").arg(dest + QLatin1String(".log"));
args.replace(args.indexOf(QStringLiteral("pass=2")), QStringLiteral("pass=1"));
if (args.contains(QStringLiteral("vcodec=libx264"))) args << QStringLiteral("passlogfile=%1").arg(dest + QStringLiteral(".log"));
} else {
args.removeAll(QLatin1String("pass=1"));
args.removeAll(QStringLiteral("pass=1"));
doerase = erase;
}
......@@ -104,7 +104,7 @@ int main(int argc, char **argv)
for (int i = 0; i < args.count(); ++i) {
if (args.at(i).startsWith(QLatin1String("meta.attr"))) {
QString data = args.at(i);
args.replace(i, data.section(QLatin1Char('='), 0, 0) + QLatin1String("=\"") + QUrl::fromPercentEncoding(data.section(QLatin1Char('='), 1).toUtf8()) + QLatin1Char('\"'));
args.replace(i, data.section(QLatin1Char('='), 0, 0) + QStringLiteral("=\"") + QUrl::fromPercentEncoding(data.section(QLatin1Char('='), 1).toUtf8()) + QLatin1Char('\"'));
}
}
......@@ -114,8 +114,8 @@ int main(int argc, char **argv)
job->start();
if (dualpass) {
if (vprelist.size()>1)
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")),QString::fromLatin1("vpre=%1").arg(vprelist.at(1)));
args.replace(args.indexOf(QLatin1String("pass=1")), QLatin1String("pass=2"));
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")),QStringLiteral("vpre=%1").arg(vprelist.at(1)));
args.replace(args.indexOf(QStringLiteral("pass=1")), QStringLiteral("pass=2"));
RenderJob *dualjob = new RenderJob(erase, usekuiserver, pid, render, profile, rendermodule, player, src, dest, preargs, args, in, out);
QObject::connect(job, SIGNAL(renderingFinished()), dualjob, SLOT(start()));
}
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, const QString &id
AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, const QDomElement& description, AbstractProjectItem* parent) :
QObject()
, m_parent(parent)
, m_id(description.attribute("id"))
, m_id(description.attribute(QStringLiteral("id")))
, m_clipStatus(StatusReady)
, m_jobType(AbstractClipJob::NOJOBTYPE)
, m_jobProgress(0)
......
This diff is collapsed.
This diff is collapsed.
......@@ -34,7 +34,7 @@ ProjectFolder::ProjectFolder(const QString &id, const QString &name, ProjectFold
{
m_name = name;
m_clipStatus = StatusReady;
m_thumbnail = KoIconUtils::themedIcon("folder");
m_thumbnail = KoIconUtils::themedIcon(QStringLiteral("folder"));
setParent(parent);
}
......@@ -42,7 +42,7 @@ ProjectFolder::ProjectFolder(Bin *bin) :
AbstractProjectItem(AbstractProjectItem::FolderItem, QString::number(-1))
, m_bin(bin)
{
m_name = "root";
m_name = QStringLiteral("root");
setParent(NULL);
}
......@@ -120,8 +120,8 @@ Bin* ProjectFolder::bin()
QDomElement ProjectFolder::toXml(QDomDocument& document)
{
QDomElement folder = document.createElement("folder");
folder.setAttribute("name", name());
QDomElement folder = document.createElement(QStringLiteral("folder"));
folder.setAttribute(QStringLiteral("name"), name());
for (int i = 0; i < count(); ++i) {
folder.appendChild(at(i)->toXml(document));
}
......
......@@ -31,7 +31,7 @@ ProjectFolderUp::ProjectFolderUp(AbstractProjectItem* parent) :
AbstractProjectItem(AbstractProjectItem::FolderUpItem, QString(), parent)
, m_bin(NULL)
{
m_thumbnail = KoIconUtils::themedIcon("go-previous");
m_thumbnail = KoIconUtils::themedIcon(QStringLiteral("go-previous"));
m_name = i18n("Back");
setParent(parent);
}
......
......@@ -138,22 +138,22 @@ bool ProjectItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action
return true;
}
if (data->hasFormat("kdenlive/producerslist")) {
if (data->hasFormat(QStringLiteral("kdenlive/producerslist"))) {
// Dropping an Bin item
QStringList ids = QString(data->data("kdenlive/producerslist")).split(';');
QStringList ids = QString(data->data(QStringLiteral("kdenlive/producerslist"))).split(';');
emit itemDropped(ids, parent);
return true;
}
if (data->hasFormat("kdenlive/effectslist")) {
if (data->hasFormat(QStringLiteral("kdenlive/effectslist"))) {
// Dropping effect on a Bin item
const QString effect = QString::fromUtf8(data->data("kdenlive/effectslist"));
const QString effect = QString::fromUtf8(data->data(QStringLiteral("kdenlive/effectslist")));
emit effectDropped(effect, parent);
return true;
}
if (data->hasFormat("kdenlive/clip")) {
QStringList list = QString(data->data("kdenlive/clip")).split(';');
if (data->hasFormat(QStringLiteral("kdenlive/clip"))) {
QStringList list = QString(data->data(QStringLiteral("kdenlive/clip"))).split(';');
emit addClipCut(list.at(0), list.at(1).toInt(), list.at(2).toInt());
}
......@@ -250,7 +250,7 @@ Qt::DropActions ProjectItemModel::supportedDropActions() const
QStringList ProjectItemModel::mimeTypes() const
{
QStringList types;
types << QLatin1String("kdenlive/producerslist") << QLatin1String("text/uri-list") << QLatin1String("kdenlive/clip") << QLatin1String("kdenlive/effectslist");
types << QStringLiteral("kdenlive/producerslist") << QStringLiteral("text/uri-list") << QStringLiteral("kdenlive/clip") << QStringLiteral("kdenlive/effectslist");
return types;
}
......@@ -279,8 +279,8 @@ QMimeData* ProjectItemModel::mimeData(const QModelIndexList& indices) const
}
if (!list.isEmpty()) {
QByteArray data;
data.append(list.join(QLatin1String(";")).toUtf8());
mimeData->setData(QLatin1String("kdenlive/producerslist"), data);
data.append(list.join(QStringLiteral(";")).toUtf8());
mimeData->setData(QStringLiteral("kdenlive/producerslist"), data);
}
return mimeData;
}
......
......@@ -62,7 +62,7 @@ void ProjectSubClip::discard()
QString ProjectSubClip::getToolTip() const
{
return "test";
return QStringLiteral("test");
}
ProjectClip* ProjectSubClip::clip(const QString &id)
......@@ -100,10 +100,10 @@ ProjectClip* ProjectSubClip::clipAt(int ix)
QDomElement ProjectSubClip::toXml(QDomDocument& document)
{
QDomElement sub = document.createElement("subclip");
sub.setAttribute("id", m_masterClip->clipId());
sub.setAttribute("in", m_in);
sub.setAttribute("out", m_out);
QDomElement sub = document.createElement(QStringLiteral("subclip"));
sub.setAttribute(QStringLiteral("id"), m_masterClip->clipId());
sub.setAttribute(QStringLiteral("in"), m_in);
sub.setAttribute(QStringLiteral("out"), m_out);
return sub;
}
......
......@@ -83,9 +83,9 @@ bool MltDeviceCapture::buildConsumer(const QString &profileName)
QString videoDriver = KdenliveSettings::videodrivername();
if (!videoDriver.isEmpty()) {
if (videoDriver == "x11_noaccel") {
if (videoDriver == QLatin1String("x11_noaccel")) {
qputenv("SDL_VIDEO_YUV_HWACCEL", "0");
videoDriver = "x11";
videoDriver = QStringLiteral("x11");
} else {
qunsetenv("SDL_VIDEO_YUV_HWACCEL");
}
......@@ -164,7 +164,7 @@ void MltDeviceCapture::stop()
QString mlt_type = mlt_properties_get(properties, "mlt_type");
QString resource = mlt_properties_get(properties, "mlt_service");
// Delete all transitions
while (mlt_type == "transition") {
while (mlt_type == QLatin1String("transition")) {
nextservicetodisconnect = nextservice;
nextservice = mlt_service_producer(nextservice);
mlt_field_disconnect_service(field->get_field(), nextservicetodisconnect);
......@@ -359,7 +359,7 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
for (int i = 0; i < paramList.count(); ++i) {
tmp = qstrdup(paramList.at(i).section('=', 0, 0).toUtf8().constData());
QString value = paramList.at(i).section('=', 1, 1);
if (value == "%threads") value = QString::number(QThread::idealThreadCount());
if (value == QLatin1String("%threads")) value = QString::number(QThread::idealThreadCount());
char *tmp2 = qstrdup(value.toUtf8().constData());
renderProps->set(tmp, tmp2);
delete[] tmp;
......@@ -374,9 +374,9 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
Mlt::Properties *previewProps = new Mlt::Properties;
QString videoDriver = KdenliveSettings::videodrivername();
if (!videoDriver.isEmpty()) {
if (videoDriver == "x11_noaccel") {
if (videoDriver == QLatin1String("x11_noaccel")) {
qputenv("SDL_VIDEO_YUV_HWACCEL", "0");
videoDriver = "x11";
videoDriver = QStringLiteral("x11");
} else {
qunsetenv("SDL_VIDEO_YUV_HWACCEL");
}
......@@ -489,7 +489,7 @@ void MltDeviceCapture::setOverlay(const QString &path)
mlt_service nextservice = mlt_service_get_producer(serv);
mlt_properties properties = MLT_SERVICE_PROPERTIES(nextservice);
QString mlt_type = mlt_properties_get(properties, "mlt_type");
if (mlt_type != "transition") {
if (mlt_type != QLatin1String("transition")) {
// transition does not exist, add it
Mlt::Field *field = tractor.field();
Mlt::Transition *transition = new Mlt::Transition(*m_mltProfile, "composite");
......
......@@ -72,7 +72,7 @@ CommentedTime::CommentedTime(const GenTime &time, const QString &comment, int ma
: t(time), c(comment), type(markerType) { }
CommentedTime::CommentedTime(const QString &hash, const GenTime &time)
: t(time), c(hash.section(":", 1)), type(hash.section(":", 0, 0).toInt()) { }
: t(time), c(hash.section(QStringLiteral(":"), 1)), type(hash.section(QStringLiteral(":"), 0, 0).toInt()) { }
QString CommentedTime::comment() const {
return (c.isEmpty() ? i18n("Marker") : c);
......
This diff is collapsed.
......@@ -40,12 +40,12 @@ EncodingProfilesDialog::EncodingProfilesDialog(int profileType, QWidget * parent
profile_type->addItem(i18n("Screen capture"), 2);
profile_type->addItem(i18n("Decklink capture"), 3);
button_add->setIcon(KoIconUtils::themedIcon("list-add"));
button_edit->setIcon(KoIconUtils::themedIcon("document-edit"));
button_delete->setIcon(KoIconUtils::themedIcon("list-remove"));
button_download->setIcon(KoIconUtils::themedIcon("download"));
button_add->setIcon(KoIconUtils::themedIcon(QStringLiteral("list-add")));
button_edit->setIcon(KoIconUtils::themedIcon(QStringLiteral("document-edit")));
button_delete->setIcon(KoIconUtils::themedIcon(QStringLiteral("list-remove")));
button_download->setIcon(KoIconUtils::themedIcon(QStringLiteral("download")));
m_configFile = new KConfig("encodingprofiles.rc", KConfig::CascadeConfig, QStandardPaths::DataLocation);
m_configFile = new KConfig(QStringLiteral("encodingprofiles.rc"), KConfig::CascadeConfig, QStandardPaths::DataLocation);
profile_type->setCurrentIndex(profileType);
connect(profile_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotLoadProfiles()));
connect(profile_list, SIGNAL(currentRowChanged(int)), this, SLOT(slotShowParams()));
......@@ -69,17 +69,17 @@ void EncodingProfilesDialog::slotLoadProfiles()
QString group;
switch (profile_type->currentIndex()) {
case 0:
group = "proxy";
group = QStringLiteral("proxy");
break;
case 1:
group = "video4linux";
group = QStringLiteral("video4linux");
break;
case 2:
group = "screengrab";
group = QStringLiteral("screengrab");
break;
default:
case 3:
group = "decklink";
group = QStringLiteral("decklink");
break;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -189,7 +189,7 @@ QMap <QString, QString> DvdWizardChapters::chaptersData() const
QMap <QString, QString> result;
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
QString chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(";");
QString chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QStringLiteral(";"));
result.insert(m_view.vob_list->itemText(i), chapters);
}
return result;
......@@ -238,12 +238,12 @@ QStringList DvdWizardChapters::selectedTargets() const
QDomElement DvdWizardChapters::toXml() const
{
QDomDocument doc;
QDomElement xml = doc.createElement("xml");
QDomElement xml = doc.createElement(QStringLiteral("xml"));
doc.appendChild(xml);
for (int i = 0; i < m_view.vob_list->count(); ++i) {
QDomElement vob = doc.createElement("vob");
vob.setAttribute("file", m_view.vob_list->itemText(i));
vob.setAttribute("chapters", m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(";"));
QDomElement vob = doc.createElement(QStringLiteral("vob"));
vob.setAttribute(QStringLiteral("file"), m_view.vob_list->itemText(i));
vob.setAttribute(QStringLiteral("chapters"), m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QStringLiteral(";")));
xml.appendChild(vob);
}
return doc.documentElement();
......
......@@ -46,10 +46,10 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
connect(m_view.create_menu, SIGNAL(toggled(bool)), m_view.menu_box, SLOT(setEnabled(bool)));
connect(m_view.create_menu, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
m_view.add_button->setIcon(QIcon::fromTheme("document-new"));
m_view.delete_button->setIcon(QIcon::fromTheme("trash-empty"));
m_view.zoom_button->setIcon(QIcon::fromTheme("zoom-in"));
m_view.unzoom_button->setIcon(QIcon::fromTheme("zoom-out"));
m_view.add_button->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
m_view.delete_button->setIcon(QIcon::fromTheme(QStringLiteral("trash-empty")));
m_view.zoom_button->setIcon(QIcon::fromTheme(QStringLiteral("zoom-in")));
m_view.unzoom_button->setIcon(QIcon::fromTheme(QStringLiteral("zoom-out")));
m_view.add_button->setToolTip(i18n("Add new button"));
m_view.delete_button->setToolTip(i18n("Delete current button"));
......@@ -300,10 +300,10 @@ void DvdWizardMenu::setTargets(const QStringList &list, const QStringList &targe
m_view.target_list->addItem(i18n("Play All"), "jump title 1");
int movieCount = 0;
for (int i = 0; i < list.count(); ++i) {
if (targetlist.at(i).contains("chapter"))
if (targetlist.at(i).contains(QStringLiteral("chapter")))
m_view.target_list->addItem(list.at(i), targetlist.at(i));
else {
m_view.target_list->addItem(QIcon::fromTheme("video-x-generic"), list.at(i), targetlist.at(i));
m_view.target_list->addItem(QIcon::fromTheme(QStringLiteral("video-x-generic")), list.at(i), targetlist.at(i));
movieCount++;
}
}
......@@ -322,13 +322,13 @@ void DvdWizardMenu::checkBackgroundType(int ix)
m_view.background_image->setVisible(true);
if (ix == 1) {
m_view.background_image->clear();
m_view.background_image->setFilter("*");
m_view.background_image->setFilter(QStringLiteral("*"));
if (m_background->scene() != 0) m_scene->removeItem(m_background);
m_view.loop_movie->setVisible(false);
} else {
if (m_background->scene() != 0) m_scene->removeItem(m_background);
m_view.background_image->clear();
m_view.background_image->setFilter("video/mpeg");
m_view.background_image->setFilter(QStringLiteral("video/mpeg"));
m_view.loop_movie->setVisible(true);
}
}
......@@ -615,23 +615,23 @@ QMap <QString, QRect> DvdWizardMenu::buttonsInfo(bool letterbox)
QDomElement DvdWizardMenu::toXml() const
{
QDomDocument doc;
QDomElement xml = doc.createElement("menu");
QDomElement xml = doc.createElement(QStringLiteral("menu"));
doc.appendChild(xml);
xml.setAttribute("enabled", m_view.create_menu->isChecked());
xml.setAttribute(QStringLiteral("enabled"), m_view.create_menu->isChecked());
if (m_view.background_list->currentIndex() == 0) {
// Color bg
xml.setAttribute("background_color", m_view.background_color->color().name());
xml.setAttribute(QStringLiteral("background_color"), m_view.background_color->color().name());
} else if (m_view.background_list->currentIndex() == 1) {
// Image bg
xml.setAttribute("background_image", m_view.background_image->url().path());
xml.setAttribute(QStringLiteral("background_image"), m_view.background_image->url().path());
} else {
// Video bg
xml.setAttribute("background_video", m_view.background_image->url().path());
xml.setAttribute(QStringLiteral("background_video"), m_view.background_image->url().path());
}
xml.setAttribute("text_color", m_view.text_color->color().name());
xml.setAttribute("selected_color", m_view.selected_color->color().name());
xml.setAttribute("highlighted_color", m_view.highlighted_color->color().name());
xml.setAttribute("text_shadow", (int) m_view.use_shadow->isChecked());
xml.setAttribute(QStringLiteral("text_color"), m_view.text_color->color().name());
xml.setAttribute(QStringLiteral("selected_color"), m_view.selected_color->color().name());
xml.setAttribute(QStringLiteral("highlighted_color"), m_view.highlighted_color->color().name());
xml.setAttribute(QStringLiteral("text_shadow"), (int) m_view.use_shadow->isChecked());
QList<QGraphicsItem *> list = m_scene->items();
int buttonCount = 0;
......@@ -640,16 +640,16 @@ QDomElement DvdWizardMenu::toXml() const
if (list.at(i)->type() == DvdButtonItem) {
buttonCount++;
DvdButton *button = static_cast < DvdButton* >(list.at(i));
QDomElement xmlbutton = doc.createElement("button");
xmlbutton.setAttribute("target", button->target());
xmlbutton.setAttribute("command", button->command());
xmlbutton.setAttribute("backtomenu", button->backMenu());
xmlbutton.setAttribute("posx", (int) button->pos().x());
xmlbutton.setAttribute("posy", (int) button->pos().y());
xmlbutton.setAttribute("text", button->toPlainText());
QDomElement xmlbutton = doc.createElement(QStringLiteral("button"));
xmlbutton.setAttribute(QStringLiteral("target"), button->target());
xmlbutton.setAttribute(QStringLiteral("command"), button->command());
xmlbutton.setAttribute(QStringLiteral("backtomenu"), button->backMenu());
xmlbutton.setAttribute(QStringLiteral("posx"), (int) button->pos().x());
xmlbutton.setAttribute(QStringLiteral("posy"), (int) button->pos().y());
xmlbutton.setAttribute(QStringLiteral("text"), button->toPlainText());
QFont font = button->font();
xmlbutton.setAttribute("font_size", font.pixelSize());
xmlbutton.setAttribute("font_family", font.family());
xmlbutton.setAttribute(QStringLiteral("font_size"), font.pixelSize());
xmlbutton.setAttribute(QStringLiteral("font_family"), font.family());
xml.appendChild(xmlbutton);
}
}
......@@ -663,25 +663,25 @@ void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
if (xml.isNull()) return;
//qDebug() << "// LOADING MENU 1";
changeProfile(format);
m_view.create_menu->setChecked(xml.attribute("enabled").toInt());
if (xml.hasAttribute("background_color")) {
m_view.create_menu->setChecked(xml.attribute(QStringLiteral("enabled")).toInt());
if (xml.hasAttribute(QStringLiteral("background_color"))) {
m_view.background_list->setCurrentIndex(0);
m_view.background_color->setColor(xml.attribute("background_color"));
} else if (xml.hasAttribute("background_image")) {
m_view.background_color->setColor(xml.attribute(QStringLiteral("background_color")));
} else if (xml.hasAttribute(QStringLiteral("background_image"))) {
m_view.background_list->setCurrentIndex(1);
m_view.background_image->setUrl(QUrl(xml.attribute("background_image")));
} else if (xml.hasAttribute("background_video")) {
m_view.background_image->setUrl(QUrl(xml.attribute(QStringLiteral("background_image"))));
} else if (xml.hasAttribute(QStringLiteral("background_video"))) {
m_view.background_list->setCurrentIndex(2);
m_view.background_image->setUrl(QUrl(xml.attribute("background_video")));
m_view.background_image->setUrl(QUrl(xml.attribute(QStringLiteral("background_video"))));
}
m_view.text_color->setColor(xml.attribute("text_color"));
m_view.selected_color->setColor(xml.attribute("selected_color"));
m_view.highlighted_color->setColor(xml.attribute("highlighted_color"));
m_view.text_color->setColor(xml.attribute(QStringLiteral("text_color")));
m_view.selected_color->setColor(xml.attribute(QStringLiteral("selected_color")));
m_view.highlighted_color->setColor(xml.attribute(QStringLiteral("highlighted_color")));
m_view.use_shadow->setChecked(xml.attribute("text_shadow").toInt());
m_view.use_shadow->setChecked(xml.attribute(QStringLiteral("text_shadow")).toInt());
QDomNodeList buttons = xml.elementsByTagName("button");
QDomNodeList buttons = xml.elementsByTagName(QStringLiteral("button"));
//qDebug() << "// LOADING MENU 2" << buttons.count();
if (buttons.count() > 0) {
......@@ -697,9 +697,9 @@ void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
for (int i = 0; i < buttons.count(); ++i) {
QDomElement e = buttons.at(i).toElement();
// create menu button
DvdButton *button = new DvdButton(e.attribute("text"));
QFont font(e.attribute("font_family"));
font.setPixelSize(e.attribute("font_size").toInt());
DvdButton *button = new DvdButton(e.attribute(QStringLiteral("text")));
QFont font(e.attribute(QStringLiteral("font_family")));
font.setPixelSize(e.attribute(QStringLiteral("font_size")).toInt());
if (m_view.use_shadow->isChecked()) {
QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this);
shadow->setBlurRadius(7);
......@@ -709,12 +709,12 @@ void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
//font.setStyleStrategy(QFont::NoAntialias);
button->setFont(font);
button->setTarget(e.attribute("target").toInt(), e.attribute("command"));
button->setBackMenu(e.attribute("backtomenu").toInt());
button->setTarget(e.attribute(QStringLiteral("target")).toInt(), e.attribute(QStringLiteral("command")));
button->setBackMenu(e.attribute(QStringLiteral("backtomenu")).toInt());
button->setDefaultTextColor(m_view.text_color->color());
button->setZValue(4);
m_scene->addItem(button);
button->setPos(e.attribute("posx").toInt(), e.attribute("posy").toInt());
button->setPos(e.attribute(QStringLiteral("posx")).toInt(), e.attribute(QStringLiteral("posy")).toInt());
}
}
......
......@@ -81,7 +81,7 @@ class DvdButton : public QGraphicsTextItem
{
public:
explicit DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0), m_command(QString("jump title 1")), m_backToMenu(false) {
explicit DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0), m_command(QStringLiteral("jump title 1")), m_backToMenu(false) {
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
#if QT_VERSION >= 0x040600
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ QMimeData *EffectBasket::mimeData(const QList<QListWidgetItem *> list) const
QMimeData *mime = new QMimeData;
QByteArray data;
data.append(doc.toString().toUtf8());
mime->setData("kdenlive/effectslist", data);
mime->setData(QStringLiteral("kdenlive/effectslist"), data);
return mime;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -69,16 +69,16 @@ public:
}
protected:
void dragEnterEvent(QDragEnterEvent * event) {
if (event->mimeData()->hasFormat("kdenlive/effectslist")) {
if (event->mimeData()->hasFormat(QStringLiteral("kdenlive/effectslist"))) {
event->accept();
}
}
void dropEvent(QDropEvent * event) {
const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
const QString effects = QString::fromUtf8(event->mimeData()->data(QStringLiteral("kdenlive/effectslist")));
QDomDocument doc;
doc.setContent(effects, true);
QString id = doc.documentElement().attribute("id");
if (id.isEmpty()) id = doc.documentElement().attribute("tag");
QString id = doc.documentElement().attribute(QStringLiteral("id"));
if (id.isEmpty()) id = doc.documentElement().attribute(QStringLiteral("tag"));
emit addEffectToFavorites(id);
}
signals:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,15 +32,15 @@ ComplexParameter::ComplexParameter(QWidget *parent) :
//m_ui.effectlist->verticalHeader()->setVisible(false);
m_ui.buttonLeftRight->setIcon(KoIconUtils::themedIcon("go-next"));//better icons needed
m_ui.buttonLeftRight->setIcon(KoIconUtils::themedIcon(QStringLiteral("go-next")));//better icons needed
m_ui.buttonLeftRight->setToolTip(i18n("Allow horizontal moves"));
m_ui.buttonUpDown->setIcon(KoIconUtils::themedIcon("go-up"));
m_ui.buttonUpDown->setIcon(KoIconUtils::themedIcon(QStringLiteral("go-up")));
m_ui.buttonUpDown->setToolTip(i18n("Allow vertical moves"));
m_ui.buttonShowInTimeline->setIcon(KoIconUtils::themedIcon("draw-line"));
m_ui.buttonShowInTimeline->setIcon(KoIconUtils::themedIcon(QStringLiteral("draw-line")));
m_ui.buttonShowInTimeline->setToolTip(i18n("Show keyframes in timeline"));
m_ui.buttonHelp->setIcon(KoIconUtils::themedIcon("help-about"));
m_ui.buttonHelp->setIcon(KoIconUtils::themedIcon(QStringLiteral("help-about")));
m_ui.buttonHelp->setToolTip(i18n("Parameter info"));
m_ui.buttonNewPoints->setIcon(KoIconUtils::themedIcon("document-new"));
m_ui.buttonNewPoints->setIcon(KoIconUtils::themedIcon(QStringLiteral("document-new")));
m_ui.buttonNewPoints->setToolTip(i18n("Add keyframe"));
connect(m_ui.buttonLeftRight, SIGNAL(clicked()), this , SLOT(slotSetMoveX()));
......@@ -98,7 +98,7 @@ void ComplexParameter::updateButtonStatus()
m_ui.buttonShowInTimeline->setEnabled(m_ui.kplotwidget->isMoveX() || m_ui.kplotwidget->isMoveY());
m_ui.buttonShowInTimeline->setDown(m_ui.kplotwidget->isMoveTimeline());
m_ui.buttonNewPoints->setEnabled(m_ui.parameterList->currentText() != "all");
m_ui.buttonNewPoints->setEnabled(m_ui.parameterList->currentText() != QLatin1String("all"));
m_ui.buttonNewPoints->setDown(m_ui.kplotwidget->isNewPoints());
}
......@@ -135,7 +135,7 @@ void ComplexParameter::slotUpdateParameterList(const QStringList &l)
{
//qDebug() << l ;
m_ui.parameterList->clear();
m_ui.parameterList->addItem("all");
m_ui.parameterList->addItem(QStringLiteral("all"));
m_ui.parameterList->addItems(l);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.