Skip to content

Commit

Permalink
Fix build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed Jun 26, 2023
1 parent 1e35031 commit b075214
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 29 deletions.
4 changes: 3 additions & 1 deletion src/App/ExpressionParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ class AppExport PyObjectExpression : public Expression {
static ExpressionPtr create(const App::DocumentObject *owner, PyObject *pyobj=0);
~PyObjectExpression() override;

using Expression::setPyObject; // no actual use, just silence compiler warning

void setPyObject(Py::Object pyobj);
void setPyObject(PyObject *pyobj, bool owned=false);

Expand Down Expand Up @@ -742,7 +744,7 @@ class AppExport RangeExpression : public App::Expression {
ExpressionPtr _copy() const override;
void _getIdentifiers(std::map<App::ObjectIdentifier,bool> &) const override;
bool _renameObjectIdentifier(const std::map<ObjectIdentifier,ObjectIdentifier> &,
const ObjectIdentifier &, ExpressionVisitor &);
const ObjectIdentifier &, ExpressionVisitor &) override;
void _moveCells(const CellAddress &, int, int, ExpressionVisitor &) override;
void _offsetCells(int, int, ExpressionVisitor &) override;
Py::Object _getPyValue(int *jumpCode=nullptr) const override;
Expand Down
4 changes: 2 additions & 2 deletions src/App/Origin.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ class AppExport Origin : public App::DocumentObject
/// Removes all planes and axis if they are still linked to the document
void unsetupObject () override;

virtual bool canSaveExtension(Extension *) const;
virtual void Restore(Base::XMLReader& reader);
bool canSaveExtension(Extension *) const override;
void Restore(Base::XMLReader& reader) override;

private:
class OriginExtension : public GeoFeatureGroupExtension {
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Command.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ class GuiExport GroupCommand : public Command,
const char *paramEntry=nullptr);
~GroupCommand() override;

void OnChange(Base::Subject<const char*> &, const char* sReason);
void OnChange(Base::Subject<const char*> &, const char* sReason) override;

/** Add child command
* @param cmd: child command. Pass null pointer to add a separator.
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/ExpressionCompleter.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public Q_SLOTS:

private:
void init();
virtual QString pathFromIndex ( const QModelIndex & index ) const;
virtual QStringList splitPath ( const QString & path ) const;
QString pathFromIndex ( const QModelIndex & index ) const override;
QStringList splitPath ( const QString & path ) const override;
void showPopup(bool show);

App::ExpressionTokenizer tokenizer;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/FileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ QString FileDialog::getExistingDirectory( QWidget * parent, const QString & capt

QFileDialog dialog(parent, caption, dir);
new PrefWidgetStates(&dialog, true, "FileDialog", &dialog);
dialog.setFileMode((options & ShowDirsOnly) ? DirectoryOnly : Directory);
// dialog.setFileMode((options & ShowDirsOnly) ? DirectoryOnly : Directory);

This comment has been minimized.

Copy link
@scottmudge

scottmudge Jun 30, 2023

This breaks the "Save as Directory" dialog, which no longer allows selecting a folder in Windows.

Uncommenting/reverting this change this doesn't cause any build issues for me.

This comment has been minimized.

Copy link
@realthunder

realthunder Jul 1, 2023

Author Owner

Thanks. Not sure where I saw the deprecation warning.

This comment has been minimized.

Copy link
@scottmudge

scottmudge Jul 6, 2023

Appreciate the hard work on the big merge w/ FC upstream. Is this branch the new 'working' one for now? I've been testing it a bit in my daily workflow. Should I report any bugs? Most of them I've found have been pretty minor and easy to fix... e.g., right overlay tab/dock being too short due to the navicube being freely movable (so I think the NaviCube Corner setting no longer applies/matters, which appears to affect the overlay dock heights/dimensions).

This comment has been minimized.

Copy link
@realthunder

realthunder Jul 8, 2023

Author Owner

Yes, for now. Once I got more time to test a bit more, I'll merge to LinkMerge for release. So yes, you can report problem in this branch.

dialog.setOptions(options);
dialog.setSupportedSchemes(QStringList(QStringLiteral("file")));
QString path;
Expand Down
9 changes: 8 additions & 1 deletion src/Gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,14 @@ void MainWindowP::applyOverrideIcons(const QStringList &icons)
if (path.size()) {
QSize size(64, 64);
if (pair.size() == 3) {
auto sz = pair[2].trimmed().split(QLatin1Char('x'), QString::KeepEmptyParts, Qt::CaseInsensitive);
auto sz = pair[2].trimmed().split(
QLatin1Char('x'),
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QString::KeepEmptyParts,
#else
Qt::KeepEmptyParts,
#endif
Qt::CaseInsensitive);
if (sz.size() >= 1) {
size.setWidth(sz[0].toInt());
if (sz.size() > 1)
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/MouseSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class GuiExport PolyPickerSelection : public BaseMouseSelection
void initialize() override;
void terminate(bool abort = false) override;

virtual QCursor getCursor(int);
QCursor getCursor(int) override;

protected:
int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) override;
Expand Down Expand Up @@ -228,7 +228,7 @@ class GuiExport RubberbandSelection : public BaseMouseSelection
int locationEvent(const SoLocation2Event* const e, const QPoint& pos) override;
int keyboardEvent(const SoKeyboardEvent* const e) override;

virtual QCursor getCursor(int);
QCursor getCursor(int) override;

/// draw the rectangle
void draw() override;
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/NaviCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ class NaviCubeShared : public std::enable_shared_from_this<NaviCubeShared> {
{"Text", "TextColor", Qt::black, m_TextColor},
{"Highlight", "HiliteColor", QColor(170, 226, 255, 255), m_HiliteColor},
{"Face", "FrontColor", QColor(226, 233, 239, 192), m_FrontFaceColor},
{"Edge", "EdgeColor", QColor(226, 233, 239, 192).dark(140), m_EdgeFaceColor},
{"Corner", "CornerColor", QColor(226, 233, 239, 192).dark(110), m_CornerFaceColor},
{"Edge", "EdgeColor", QColor(226, 233, 239, 192).darker(140), m_EdgeFaceColor},
{"Corner", "CornerColor", QColor(226, 233, 239, 192).darker(110), m_CornerFaceColor},
{"Button", "ButtonColor", QColor(226, 233, 239, 128), m_ButtonColor},
{"Border", "BorderColor", QColor(50, 50, 50, 255), m_BorderColor},
{"Axis label", "AxisLabelColor", Qt::black, m_AxisLabelColor}}
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/PrefWidgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ class GuiExport PrefFileChooser : public FileChooser, public PrefWidget

protected:
// restore from/save to parameters
void restorePreferences();
void savePreferences();
void restorePreferences() override;
void savePreferences() override;

private:
QString m_Default;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/QuantitySpinBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class GuiExport QuantitySpinBox : public QAbstractSpinBox, public ExpressionSpin
* Quantity.
*/
Base::Unit unit() const;
void setUnit(const Base::Unit &unit);
void setUnit(const Base::Unit &unit) override;
/// Set the unit property
void setUnitText(const QString&);
/// Get the unit property
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/QuantitySpinBox_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class ExpressionLabel : public QLabel
Q_EMIT clicked();
}

bool event(QEvent *ev) {
bool event(QEvent *ev) override {
if (ev->type() == QEvent::ToolTip) {
ev->accept();
QHelpEvent* he = static_cast<QHelpEvent*>(ev);
Expand All @@ -123,7 +123,7 @@ class ExpressionLabel : public QLabel
return iconHeight + parentWidget()->style()->pixelMetric(QStyle::PM_SpinBoxFrameWidth);
}

bool eventFilter(QObject *o, QEvent *ev) {
bool eventFilter(QObject *o, QEvent *ev) override {
auto parent = parentWidget();
if (o && o == parent) {
switch(ev->type()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/SoFCSelectionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct GuiExport SoFCSelectionContext : SoFCSelectionContextBase

~SoFCSelectionContext() override;

virtual bool isCounted() const {
bool isCounted() const override {
return isSelected();
}

Expand Down Expand Up @@ -134,7 +134,7 @@ struct GuiExport SoFCSelectionContextEx : SoFCSelectionContext

static MergeFunc merge;

virtual bool isCounted() const {
bool isCounted() const override {
return !colors.empty() || isSelected();
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/SpinBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ class GuiExport DoubleSpinBox : public QDoubleSpinBox, public ExpressionSpinBox
using ExpressionSpinBox::apply;
void setNumberExpression(App::NumberExpression*) override;

void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *event);
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent *event) override;
};

} // namespace Gui
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class TreeWidget : public QTreeWidget, public SelectionObserver
Select = 0x02,
TreeSubName = 0x04,
};
Q_DECLARE_FLAGS(FindItemOptions, FindItemOption);
Q_DECLARE_FLAGS(FindItemOptions, FindItemOption)

static QTreeWidgetItem *findItem(const App::SubObjectT &objT,
QTreeWidgetItem *context = nullptr,
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ class GuiExport BaseView : public App::PropertyContainer
/// indicates if the view is in passive mode
bool isPassive() const {return bIsPassive;}

virtual void onChanged(const App::Property *);
void onChanged(const App::Property *) override;

virtual App::Document *getOwnerDocument() const {
App::Document *getOwnerDocument() const override {
return getAppDocument();
}

virtual std::string getFullName(bool python=false) const;
std::string getFullName(bool python=false) const override;

/** @name methods to override
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/View3DInventor.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class GuiExport View3DInventor : public MDIView
void onRename(Gui::Document *pDoc) override;
void onUpdate(void) override;
void viewAll() override;
const char *getName(void) const;
const char *getName(void) const override;
void onChanged(const App::Property *prop) override;

void bindCamera(SoCamera *camera, bool sync=false);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/ViewProviderDatum.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Gui {

class GuiExport ViewProviderDatum : public Gui::ViewProviderGeometryObject
{
PROPERTY_HEADER(Gui::ViewProviderDatum);
PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderDatum);

public:
/// constructor
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/ViewProviderOriginFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class GuiExport ViewProviderOriginFeature: public ViewProviderGeometryObject {
{ }
///@}

virtual QIcon getIcon() const;
QIcon getIcon() const override;

protected:
void onChanged ( const App::Property* prop ) override;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/propertyeditor/PropertyEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *ev) {

auto setupAction = [&](const char *name, int action_type, int ptype, int prop_type) {
QCheckBox *checkbox;
QString text = tr({name});
QString text = tr(name);
bool checked = (propStatus & (1<<ptype)) ? true : false;
action = Action::addCheckBox(&menu, text, checked, &checkbox);
action->setData(QVariant(action_type));
Expand Down
1 change: 1 addition & 0 deletions src/Mod/PartDesign/App/FeaturePipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# include <BRepClass3d_SolidClassifier.hxx>
# include <BRepOffsetAPI_MakePipeShell.hxx>
# include <gp_Ax2.hxx>
# include <gp_Pln.hxx>
# include <Law_Function.hxx>
# include <Precision.hxx>
# include <ShapeAnalysis_FreeBounds.hxx>
Expand Down

0 comments on commit b075214

Please sign in to comment.