Index: kundo2_aware_xgettext.sh =================================================================== --- kundo2_aware_xgettext.sh +++ kundo2_aware_xgettext.sh @@ -26,7 +26,7 @@ # Then check that all messages in sample.pot have "(qtundo-format)" in msgctxt. function add_ctxt_qtundo() { POT_PART_QUNDOFORMAT="$1" - POT_PART_QUNDOFORMAT2="$(mktemp $podir/_qundoformat2_XXXXXXXX.pot)" + POT_PART_QUNDOFORMAT2="`mktemp $podir/_qundoformat2_XXXXXXXX.pot`" # Prepend "(qtundo-format)" to existing msgctxt properties of messages sed -i -e 's/^msgctxt "/msgctxt "(qtundo-format) /' "${POT_PART_QUNDOFORMAT}" @@ -49,9 +49,9 @@ function kundo2_aware_xgettext_internal() { SRC_FILES="$*" - POT_PART_NORMAL="$(mktemp $podir/_normal_XXXXXXXX.pot)" - POT_PART_QUNDOFORMAT="$(mktemp $podir/_qundoformat_XXXXXXXX.pot)" - POT_MERGED="$(mktemp $podir/_merged_XXXXXXXX.pot)" + POT_PART_NORMAL="`mktemp $podir/_normal_XXXXXXXX.pot`" + POT_PART_QUNDOFORMAT="`mktemp $podir/_qundoformat_XXXXXXXX.pot`" + POT_MERGED="`mktemp $podir/_merged_XXXXXXXX.pot`" $XGETTEXT ${CXG_EXTRA_ARGS} ${SRC_FILES} -o "${POT_PART_NORMAL}" --force-po @@ -74,7 +74,7 @@ add_ctxt_qtundo "${POT_PART_QUNDOFORMAT}" fi - if [ -s "${POT_PART_NORMAL}" ] && [ -s "${POT_PART_QUNDOFORMAT}" ]; then + if [ -s "${POT_PART_NORMAL}" -a -s "${POT_PART_QUNDOFORMAT}" ]; then # ensure an empty line or else KDE_HEADER search will fail # in case POT_PART_NORMAL only contains header echo "" >>${POT_PART_NORMAL} @@ -103,7 +103,7 @@ # To disable excluding for given file, e.g. foo.pot, add "foo.pot" line to the .i18n file. function find_exclude() { EXCLUDE="" - for f in $(find . -name .i18n | sed 's/\/\.i18n$//g' | sort); do + for f in `find . -name .i18n | sed 's/\/\.i18n$//g' | sort`; do if ! grep -q "^${1}$" "$f/.i18n" ; then if [ -n "$EXCLUDE" ] ; then EXCLUDE="$EXCLUDE -o " ; fi EXCLUDE="$EXCLUDE -path $f" Index: libs/libqml/plugins/components/PageStack.js =================================================================== --- libs/libqml/plugins/components/PageStack.js +++ libs/libqml/plugins/components/PageStack.js @@ -217,7 +217,7 @@ // Clears the page stack. function clear() { var container; - while (container == pageStack.pop()) { + while (container = pageStack.pop()) { container.cleanup(); } depth = 0; Index: libs/ui/widgets/kis_pattern_chooser.h =================================================================== --- libs/ui/widgets/kis_pattern_chooser.h +++ libs/ui/widgets/kis_pattern_chooser.h @@ -21,7 +21,7 @@ #include #include -class QLabel; +class KSqueezedTextLabel; class KoResourceItemChooser; class KoResource; @@ -55,7 +55,7 @@ private: - QLabel *m_lbName; + KSqueezedTextLabel *m_lblName; KoResourceItemChooser *m_itemChooser; }; Index: libs/ui/widgets/kis_pattern_chooser.cc =================================================================== --- libs/ui/widgets/kis_pattern_chooser.cc +++ libs/ui/widgets/kis_pattern_chooser.cc @@ -37,10 +37,13 @@ #include #include +#include + KisPatternChooser::KisPatternChooser(QWidget *parent) : QFrame(parent) { - m_lbName = new QLabel(this); + m_lblName = new KSqueezedTextLabel(this); + m_lblName->setTextElideMode(Qt::ElideLeft); KoResourceServer * rserver = KoResourceServerProvider::instance()->patternServer(); QSharedPointer adapter (new KoResourceServerAdapter(rserver)); @@ -57,9 +60,9 @@ this, SIGNAL(resourceSelected(KoResource *))); QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->setObjectName("main layout"); + mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); mainLayout->setMargin(0); - mainLayout->addWidget(m_lbName); + mainLayout->addWidget(m_lblName); mainLayout->addWidget(m_itemChooser, 10); KisConfig cfg(true); @@ -106,10 +109,9 @@ void KisPatternChooser::update(KoResource * resource) { + m_lblName->setFixedWidth(m_itemChooser->width()); KoPattern *pattern = static_cast(resource); - - QString text = QString("%1 (%2 x %3)").arg(i18n(pattern->name().toUtf8().data())).arg(pattern->width()).arg(pattern->height()); - m_lbName->setText(text); + m_lblName->setText(QString("%1 (%2 x %3)").arg(i18n(pattern->name().toUtf8().data())).arg(pattern->width()).arg(pattern->height())); } void KisPatternChooser::setGrayscalePreview(bool grayscale) Index: packaging/linux/appimage/build-krita.sh =================================================================== --- packaging/linux/appimage/build-krita.sh +++ packaging/linux/appimage/build-krita.sh @@ -34,7 +34,7 @@ cd $BUILD_PREFIX/krita-build/ # Determine how many CPUs we have -CPU_COUNT=$(grep processor /proc/cpuinfo | wc -l) +CPU_COUNT=`grep processor /proc/cpuinfo | wc -l` # Configure Krita cmake $KRITA_SOURCES \ Index: plugins/paintops/libpaintop/kis_texture_option.h =================================================================== --- plugins/paintops/libpaintop/kis_texture_option.h +++ plugins/paintops/libpaintop/kis_texture_option.h @@ -32,7 +32,6 @@ #include class KisTextureChooser; -class KisTextureOptionWidget; class KoPattern; class KoResource; class KisPropertiesConfiguration; Index: plugins/python/comics_project_management_tools/comics_metadata_dialog.py =================================================================== --- plugins/python/comics_project_management_tools/comics_metadata_dialog.py +++ plugins/python/comics_project_management_tools/comics_metadata_dialog.py @@ -653,7 +653,7 @@ authorList = config["authorList"] for i in range(len(authorList)): author = authorList[i] - if author.keys() > 0: + if len(author.keys()) > 0: listItems = [] listItems = [] listItems.append(QStandardItem(author.get("nickname", ""))) @@ -685,13 +685,13 @@ def getConfig(self, config): text = self.lnTitle.text() - if text > 0 and text.isspace() is False: + if len(text) > 0 and text.isspace() is False: config["title"] = text elif "title" in config.keys(): config.pop("title") config["cover"] = self.cmbCoverPage.currentText() listkeys = self.lnGenre.text() - if listkeys > 0 and listkeys.isspace() is False: + if len(listkeys) > 0 and listkeys.isspace() is False: preSplit = self.lnGenre.text().split(",") genreMatcher = re.compile(r'\((\d+)\)') genreList = {} @@ -718,28 +718,28 @@ elif "genre" in config.keys(): config.pop("genre") listkeys = self.lnCharacters.text() - if listkeys > 0 and listkeys.isspace() is False: + if len(listkeys) > 0 and listkeys.isspace() is False: config["characters"] = self.lnCharacters.text().split(", ") elif "characters" in config.keys(): config.pop("characters") listkeys = self.lnFormat.text() - if listkeys > 0 and listkeys.isspace() is False: + if len(listkeys) > 0 and listkeys.isspace() is False: config["format"] = self.lnFormat.text().split(", ") elif "format" in config.keys(): config.pop("format") config["ratingSystem"] = self.cmbRatingSystem.currentText() config["rating"] = self.cmbRating.currentText() listkeys = self.lnOtherKeywords.text() - if listkeys > 0 and listkeys.isspace() is False: + if len(listkeys) > 0 and listkeys.isspace() is False: config["otherKeywords"] = self.lnOtherKeywords.text().split(", ") elif "otherKeywords" in config.keys(): config.pop("otherKeywords") text = self.teSummary.toPlainText() - if text > 0 and text.isspace() is False: + if len(text) > 0 and text.isspace() is False: config["summary"] = text elif "summary" in config.keys(): config.pop("summary") - if self.lnSeriesName.text() > 0: + if len(self.lnSeriesName.text()) > 0: config["seriesName"] = self.lnSeriesName.text() config["seriesNumber"] = self.spnSeriesNumber.value() if self.spnSeriesVol.value() > 0: @@ -758,7 +758,7 @@ entry = self.authorModel.data(self.authorModel.index(logicalIndex, i)) if entry is None: entry = " " - if entry.isspace() is False and entry > 0: + if entry.isspace() is False and len(entry) > 0: if listEntries[i] == "role": if entry in self.acbfAuthorRolesList.values(): entryI = list(self.acbfAuthorRolesList.values()).index(entry)