View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017186 | Scribus | General | public | 2024-04-01 12:18 | 2024-09-16 20:54 |
Reporter | ale | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.7.0.svn | ||||
Fixed in Version | 1.6.2.svn | ||||
Summary | 0017186: Squash some warnings | ||||
Description | squash some warnings and remove an unused function | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
warnings.diff (6,519 bytes)
diff --git a/scribus/latexhelpers.cpp b/scribus/latexhelpers.cpp index 91532daf0..896bed15b 100644 --- a/scribus/latexhelpers.cpp +++ b/scribus/latexhelpers.cpp @@ -207,7 +207,6 @@ void LatexConfigParser::parseHighlighter(I18nXmlStreamReader& xml) bool bold = StrViewToBool(xml.attributes().value("bold")); bool italic = StrViewToBool(xml.attributes().value("italic")); bool underline = StrViewToBool(xml.attributes().value("underline")); - bool minimal = StrViewToBool(xml.attributes().value("minimal")); QString colorStr = xml.attributes().value("color").toString(); QColor color(colorStr); if (!color.isValid()) diff --git a/scribus/plugins/barcodegenerator/barcodegenerator.cpp b/scribus/plugins/barcodegenerator/barcodegenerator.cpp index 927152a76..8484b2d65 100644 --- a/scribus/plugins/barcodegenerator/barcodegenerator.cpp +++ b/scribus/plugins/barcodegenerator/barcodegenerator.cpp @@ -75,7 +75,6 @@ BarcodeGenerator::BarcodeGenerator(QWidget* parent, const char* name) for (const QRegularExpressionMatch& match : rx.globalMatch(bwipp)) { - int len = match.capturedLength(); QString restype = match.captured(1); QString resname = match.captured(2); QString reshead = match.captured(3); diff --git a/scribus/plugins/import/pdf/pdftextrecognition.cpp b/scribus/plugins/import/pdf/pdftextrecognition.cpp index 4679f8b7f..6569d56fb 100644 --- a/scribus/plugins/import/pdf/pdftextrecognition.cpp +++ b/scribus/plugins/import/pdf/pdftextrecognition.cpp @@ -56,6 +56,8 @@ void PdfTextRecognition::addChar(GfxState* state, double x, double y, double dx, case AddCharMode::ADDCHARWITHPREVIOUSSTYLE: AddCharWithPreviousStyle(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen); break; + case AddCharMode::ADDCHARWITHBASESTLYE: + break; } } @@ -325,8 +327,9 @@ PdfTextRegion::LineType PdfTextRegion::moveToPoint(QPointF newPoint) } pdfTextRegionLine = &pdfTextRegionLines.back(); - if ((mode == LineType::FIRSTPOINT && pdfTextRegionLine->segments.empty()) || mode == LineType::NEWLINE - || mode != LineType::FIRSTPOINT && pdfTextRegionLine->segments[0].glyphIndex != pdfTextRegionLine->glyphIndex) + if ((mode == LineType::FIRSTPOINT && pdfTextRegionLine->segments.empty()) + || mode == LineType::NEWLINE + || (mode != LineType::FIRSTPOINT && pdfTextRegionLine->segments[0].glyphIndex != pdfTextRegionLine->glyphIndex)) { PdfTextRegionLine newSegment = PdfTextRegionLine(); pdfTextRegionLine->segments.push_back(newSegment); diff --git a/scribus/plugins/scriptplugin/cmdobj.cpp b/scribus/plugins/scriptplugin/cmdobj.cpp index 1b4f0091d..d76fd72e2 100644 --- a/scribus/plugins/scriptplugin/cmdobj.cpp +++ b/scribus/plugins/scriptplugin/cmdobj.cpp @@ -1078,10 +1078,6 @@ PyObject *scribus_getitempagenumber(PyObject *, PyObject *args) if (!checkHaveDocument()) return nullptr; - // Is there a special name given? Yes -> add this to selection - ScribusMainWindow* currentWin = ScCore->primaryMainWindow(); - ScribusDoc* currentDoc = currentWin->doc; - PageItem *i = GetUniqueItem(QString::fromUtf8(name)); if (i == nullptr) return nullptr; diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp index d7a73a331..01269c528 100644 --- a/scribus/scribus.cpp +++ b/scribus/scribus.cpp @@ -6247,7 +6247,7 @@ void ScribusMainWindow::setNewCharStyle(const QString& name) setTBvals(currItem); } -void ScribusMainWindow::setAlignmentValue(int i) +void ScribusMainWindow::setAlignmentValue(size_t i) { contentPalette->updateTextAlignment(i); std::array<QString, 5> alignment = {"Left", "Center", "Right", "Block", "Forced"}; @@ -6259,18 +6259,6 @@ void ScribusMainWindow::setAlignmentValue(int i) } } -void ScribusMainWindow::setDirectionValue(int i) -{ - contentPalette->updateTextDirection(i); - std::array<QString, 2> direction = {"Left", "Right"}; - for (size_t j = 0; j < direction.size(); ++j) - { - QString actionName = "direction" + direction[j]; - if (scrActions[actionName]) - scrActions[actionName]->setChecked(i == j); - } -} - //CB-->?? void ScribusMainWindow::MakeFrame(int f, int c, double *vals) { diff --git a/scribus/scribus.h b/scribus/scribus.h index 51b127d6c..7703e416b 100644 --- a/scribus/scribus.h +++ b/scribus/scribus.h @@ -495,8 +495,7 @@ public slots: void setNewDirection(int i); void setNewParStyle(const QString& name); void setNewCharStyle(const QString& name); - void setAlignmentValue(int i); - void setDirectionValue(int i); + void setAlignmentValue(size_t i); void editItemsFromOutlines(PageItem *ite); //0= center, 1 = top left. void selectItemsFromOutlines(PageItem *ite, bool single = false, int position = 0); diff --git a/scribus/ui/search.cpp b/scribus/ui/search.cpp index 715f275ce..ff72e238d 100644 --- a/scribus/ui/search.cpp +++ b/scribus/ui/search.cpp @@ -544,23 +544,11 @@ int SearchReplace::doSearch_storyText(const StoryText& storyText, int start, int int sEff = 0; int sFillSh = 100; int sStrokeSh = 100; - bool searchForReplace = false; - bool rep = false; bool found = true; int maxChar = storyText.length() - 1; textLen = 0; - if ((replaceFillCheckBox->isChecked()) || (replaceStrokeCheckBox->isChecked()) || (replaceStyleCheckBox->isChecked()) || (replaceFontCheckBox->isChecked()) - || (replaceStrokeShadeCheckBox->isChecked()) || (replaceFillShadeCheckBox->isChecked()) || (replaceSizeCheckBox->isChecked()) || (replaceTextCheckBox->isChecked()) - || (replaceEffectCheckBox->isChecked()) || (replaceAlignCheckBox->isChecked())) - rep = true; - - if ((searchFillCheckBox->isChecked()) || (searchStrokeCheckBox->isChecked()) || (searchStyleCheckBox->isChecked()) || (searchFontCheckBox->isChecked()) - || (searchStrokeShadeCheckBox->isChecked()) || (searchFillShadeCheckBox->isChecked()) || (searchSizeCheckBox->isChecked()) || (searchTextCheckBox->isChecked()) - || (searchEffectCheckBox->isChecked()) || (searchAlignCheckBox->isChecked())) - searchForReplace = true; - if (searchTextCheckBox->isChecked()) sText = searchTextLineEdit->text(); if (ignoreCaseCheckBox->isChecked()) diff --git a/scribus/ui/tabruler.cpp b/scribus/ui/tabruler.cpp index 40d292223..564a50890 100644 --- a/scribus/ui/tabruler.cpp +++ b/scribus/ui/tabruler.cpp @@ -173,7 +173,6 @@ void RulerT::mousePressEvent(QMouseEvent *m) QRect fpo; mousePressed = true; int mPosX = m->position().x(); - int mPosY = m->position().y(); QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor)); rulerCode = 0; if (haveInd) |
|
Applied, except for the scribus.* stuff which could have future use. Thanks! |
|
i guess that you kept the unused function. would it be possible to add a comment with the reasons why, you're keeping the function (as an example the possible future usage... but it might be as simple as "kept for future usage") and the current date... so that in 5 years we can check again if it's worth to be kept or not...) it would be nice to have one day scribus to compile without warnings. even if most warnings are harmless, there might be some relevant ones... which might stay undetected for a long time. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-04-01 12:18 | ale | New Issue | |
2024-04-01 12:18 | ale | File Added: warnings.diff | |
2024-04-01 17:08 | ale | Summary | squash some warnings => [PATCH] squash some warnings |
2024-04-01 17:08 | ale | Patch | No => Yes |
2024-04-10 21:52 | jghali | Summary | [PATCH] squash some warnings => Squash some warnings |
2024-04-10 21:53 | jghali | Assigned To | => jghali |
2024-04-10 21:53 | jghali | Status | new => resolved |
2024-04-10 21:53 | jghali | Resolution | open => fixed |
2024-04-10 21:53 | jghali | Fixed in Version | => 1.6.2.svn |
2024-04-10 21:53 | jghali | Note Added: 0051093 | |
2024-04-11 07:34 | ale | Note Added: 0051095 | |
2024-09-16 20:54 | cbradney | Status | resolved => closed |