Skip to content

Commit

Permalink
Big update to remove deprecation warning from Qt 5.15.0
Browse files Browse the repository at this point in the history
That is need on MacOS build as travis log is bigger than 50k lines
which breaks travis rules
And by the way deprecations are real
All file contains the same modification replace 0 to Qt::WindowFlags() when needed
as the class needs to be instantiated

Signed-off-by: vejmarie <jmverdun3@gmail.com>
  • Loading branch information
vejmarie authored and wwmayer committed Sep 24, 2020
1 parent 0306c23 commit 81af54e
Show file tree
Hide file tree
Showing 65 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion src/Gui/CommandView.cpp
Expand Up @@ -1799,7 +1799,7 @@ void StdViewScreenShot::activated(int iMsg)
selFilter = filter.last();
}

FileOptionsDialog fd(getMainWindow(), 0);
FileOptionsDialog fd(getMainWindow(), Qt::WindowFlags());
fd.setFileMode(QFileDialog::AnyFile);
fd.setAcceptMode(QFileDialog::AcceptSave);
fd.setWindowTitle(QObject::tr("Save picture"));
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DemoMode.h
Expand Up @@ -44,7 +44,7 @@ class GuiExport DemoMode : public QDialog
Q_OBJECT

public:
DemoMode(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DemoMode(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DemoMode();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgActivateWindowImp.h
Expand Up @@ -40,7 +40,7 @@ class DlgActivateWindowImp : public QDialog
Q_OBJECT

public:
DlgActivateWindowImp(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgActivateWindowImp(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgActivateWindowImp();

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgCustomizeImp.h
Expand Up @@ -51,7 +51,7 @@ class DlgCustomizeImp : public QDialog
Q_OBJECT

public:
DlgCustomizeImp(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgCustomizeImp(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgCustomizeImp();

static void addPage(const char* className);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgDisplayPropertiesImp.h
Expand Up @@ -56,7 +56,7 @@ class DlgDisplayPropertiesImp : public QDialog,
Q_OBJECT

public:
DlgDisplayPropertiesImp(bool floating, QWidget* parent = nullptr, Qt::WindowFlags fl = 0);
DlgDisplayPropertiesImp(bool floating, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgDisplayPropertiesImp();
/// Observer message from the Selection
void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgEditFileIncludePropertyExternal.h
Expand Up @@ -39,7 +39,7 @@ class GuiExport DlgEditFileIncludePropertyExternal : public DlgRunExternal
Q_OBJECT

public:
DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = 0, Qt::WindowFlags fl = 0 );
DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags() );
virtual ~DlgEditFileIncludePropertyExternal();

int Do(void);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgMacroExecuteImp.h
Expand Up @@ -44,7 +44,7 @@ class DlgMacroExecuteImp : public QDialog, public Gui::WindowParameter
Q_OBJECT

public:
DlgMacroExecuteImp( QWidget* parent = 0, Qt::WindowFlags fl = 0 );
DlgMacroExecuteImp( QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags() );
~DlgMacroExecuteImp();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgMacroRecordImp.h
Expand Up @@ -43,7 +43,7 @@ class DlgMacroRecordImp : public QDialog, public Gui::WindowParameter
Q_OBJECT

public:
DlgMacroRecordImp( QWidget* parent = 0, Qt::WindowFlags fl = 0 );
DlgMacroRecordImp( QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags() );
virtual ~DlgMacroRecordImp();

protected Q_SLOTS:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgMaterialPropertiesImp.h
Expand Up @@ -39,7 +39,7 @@ class DlgMaterialPropertiesImp : public QDialog
Q_OBJECT

public:
DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgMaterialPropertiesImp();
void setViewProviders(const std::vector<Gui::ViewProvider*>&);
QColor diffuseColor() const;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgObjectSelection.h
Expand Up @@ -33,7 +33,7 @@ class GuiExport DlgObjectSelection : public QDialog

public:
DlgObjectSelection(const std::vector<App::DocumentObject*> &objs,
QWidget* parent = 0, Qt::WindowFlags fl = 0);
QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgObjectSelection();

std::vector<App::DocumentObject*> getSelections() const;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgParameterImp.h
Expand Up @@ -46,7 +46,7 @@ class GuiExport DlgParameterImp : public QDialog
Q_OBJECT

public:
DlgParameterImp( QWidget* parent = 0, Qt::WindowFlags fl = 0 );
DlgParameterImp( QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags() );
~DlgParameterImp();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgPreferencesImp.h
Expand Up @@ -112,7 +112,7 @@ class GuiExport DlgPreferencesImp : public QDialog
static void addPage(const std::string& className, const std::string& group);
static void removePage(const std::string& className, const std::string& group);

DlgPreferencesImp(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgPreferencesImp(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgPreferencesImp();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgProjectInformationImp.h
Expand Up @@ -40,7 +40,7 @@ class DlgProjectInformationImp : public QDialog
Q_OBJECT

public:
DlgProjectInformationImp(App::Document* doc, QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgProjectInformationImp(App::Document* doc, QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgProjectInformationImp();
void accept();

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgProjectUtility.h
Expand Up @@ -35,7 +35,7 @@ class DlgProjectUtility : public QDialog
Q_OBJECT

public:
DlgProjectUtility(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgProjectUtility(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgProjectUtility();

private Q_SLOTS:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgRunExternal.h
Expand Up @@ -41,7 +41,7 @@ class GuiExport DlgRunExternal : public QDialog
Q_OBJECT

public:
DlgRunExternal(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgRunExternal(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
virtual ~DlgRunExternal();

int Do(void);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgSettingsColorGradientImp.h
Expand Up @@ -44,7 +44,7 @@ class DlgSettingsColorGradientImp : public QDialog
Q_OBJECT

public:
DlgSettingsColorGradientImp( QWidget* parent = 0, Qt::WindowFlags fl = 0 );
DlgSettingsColorGradientImp( QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags() );
~DlgSettingsColorGradientImp();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgUnitsCalculatorImp.h
Expand Up @@ -42,7 +42,7 @@ class DlgUnitsCalculator : public QDialog
Q_OBJECT

public:
DlgUnitsCalculator(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgUnitsCalculator(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgUnitsCalculator();

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DocumentModel.cpp
Expand Up @@ -628,7 +628,7 @@ Qt::ItemFlags DocumentModel::flags(const QModelIndex &index) const
// return Qt::ItemIsEnabled;
//return QAbstractItemModel::flags(index);
if (!index.isValid())
return 0;
return Qt::ItemFlags();
return static_cast<DocumentModelIndex*>(index.internalPointer())->flags();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/EditorView.cpp
Expand Up @@ -79,7 +79,7 @@ class EditorViewP {
* name 'name'.
*/
EditorView::EditorView(QPlainTextEdit* editor, QWidget* parent)
: MDIView(0,parent,0), WindowParameter( "Editor" )
: MDIView(0,parent,Qt::WindowFlags()), WindowParameter( "Editor" )
{
d = new EditorViewP;
d->lock = false;
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/FileDialog.h
Expand Up @@ -49,13 +49,13 @@ class GuiExport FileDialog : public QFileDialog

public:
static QString getOpenFileName( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(),
const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 );
const QString & filter = QString(), QString * selectedFilter = 0, Options options = Options() );
static QString getSaveFileName( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(),
const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 );
const QString & filter = QString(), QString * selectedFilter = 0, Options options = Options() );
static QString getExistingDirectory( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(),
Options options = ShowDirsOnly );
static QStringList getOpenFileNames( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(),
const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 );
const QString & filter = QString(), QString * selectedFilter = 0, Options options = Options() );

/*! Return the last directory a file was read from or saved to. */
static QString getWorkingDirectory();
Expand Down
8 changes: 4 additions & 4 deletions src/Gui/InputVector.h
Expand Up @@ -83,7 +83,7 @@ class GuiExport LocationDialog : public QDialog
Q_OBJECT

protected:
LocationDialog(QWidget* parent = 0, Qt::WindowFlags fl = 0);
LocationDialog(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
virtual ~LocationDialog();

protected:
Expand Down Expand Up @@ -116,7 +116,7 @@ template <class Ui>
class LocationDialogUi : public LocationDialog, public Ui
{
public:
LocationDialogUi(QWidget* parent = 0, Qt::WindowFlags fl = 0) : LocationDialog(parent, fl)
LocationDialogUi(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags()) : LocationDialog(parent, fl)
{
this->setupUi(this);
this->retranslate();
Expand Down Expand Up @@ -366,7 +366,7 @@ template <class Ui>
class LocationDialogImp : public LocationDialog
{
public:
LocationDialogImp(QWidget* parent = 0, Qt::WindowFlags fl = 0)
LocationDialogImp(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags())
: LocationDialog(parent, fl), ui(this)
{
}
Expand Down Expand Up @@ -556,7 +556,7 @@ class GuiExport LocationDialogUiImp : public LocationDialog
{
public:
template<class T>
LocationDialogUiImp(T* t, QWidget* parent = 0, Qt::WindowFlags fl = 0)
LocationDialogUiImp(T* t, QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags())
: LocationDialog(parent, fl), ui(new LocationImpUi<T>(t))
{
std::shared_ptr<T> uit = boost::any_cast< std::shared_ptr<T> >(ui->get());
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/MDIView.h
Expand Up @@ -62,7 +62,7 @@ class GuiExport MDIView : public QMainWindow, public BaseView
* the view will attach to the active document. Be aware, there isn't
* always an active document.
*/
MDIView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=0);
MDIView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags());
/** View destructor
* Detach the view from the document, if attached.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/ManualAlignment.cpp
Expand Up @@ -369,7 +369,7 @@ class AlignmentView : public Gui::AbstractSplitView
public:
QLabel* myLabel;

AlignmentView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=0)
AlignmentView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags())
: AbstractSplitView(pcDocument, parent, wflags)
{
//anti-aliasing settings
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/Placement.h
Expand Up @@ -45,7 +45,7 @@ class GuiExport Placement : public Gui::LocationDialog
Q_OBJECT

public:
Placement(QWidget* parent = 0, Qt::WindowFlags fl = 0);
Placement(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~Placement();
void accept();
void reject();
Expand Down Expand Up @@ -116,7 +116,7 @@ class GuiExport DockablePlacement : public Placement
Q_OBJECT

public:
DockablePlacement(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DockablePlacement(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DockablePlacement();

void accept();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/QSint/actionpanel/actionbox.h
Expand Up @@ -182,7 +182,7 @@ class QSINT_EXPORT ActionBox : public QFrame
void setIcon(const QPixmap & icon);
/** Returns icon of the ActionBox.
*/
inline const QPixmap* icon() const { return iconLabel->pixmap(); }
inline QPixmap icon() { return iconLabel->pixmap(Qt::ReturnByValue); }

/** Returns header item of the ActionBox.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/QSint/actionpanel/taskheader_p.cpp
Expand Up @@ -264,7 +264,7 @@ void TaskHeader::keyPressEvent ( QKeyEvent * event )
{
case Qt::Key_Down:
{
QKeyEvent ke(QEvent::KeyPress, Qt::Key_Tab, 0);
QKeyEvent ke(QEvent::KeyPress, Qt::Key_Tab,0 );
QApplication::sendEvent(this, &ke);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Quarter/QuarterWidget.cpp
Expand Up @@ -154,7 +154,7 @@ class CustomGLWidget : public QOpenGLWidget {
public:
QSurfaceFormat myFormat;

CustomGLWidget(const QSurfaceFormat& format, QWidget* parent = 0, const QOpenGLWidget* shareWidget = 0, Qt::WindowFlags f = 0)
CustomGLWidget(const QSurfaceFormat& format, QWidget* parent = 0, const QOpenGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags())
: QOpenGLWidget(parent, f), myFormat(format)
{
Q_UNUSED(shareWidget);
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/Quarter/QuarterWidget.h
Expand Up @@ -81,9 +81,9 @@ class QUARTER_DLL_API QuarterWidget : public QGraphicsView {


public:
explicit QuarterWidget(QWidget * parent = 0, const QtGLWidget * sharewidget = 0, Qt::WindowFlags f = 0);
explicit QuarterWidget(QtGLContext * context, QWidget * parent = 0, const QtGLWidget * sharewidget = 0, Qt::WindowFlags f = 0);
explicit QuarterWidget(const QtGLFormat & format, QWidget * parent = 0, const QtGLWidget * shareWidget = 0, Qt::WindowFlags f = 0);
explicit QuarterWidget(QWidget * parent = 0, const QtGLWidget * sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit QuarterWidget(QtGLContext * context, QWidget * parent = 0, const QtGLWidget * sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit QuarterWidget(const QtGLFormat & format, QWidget * parent = 0, const QtGLWidget * shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
virtual ~QuarterWidget();

enum TransparencyType {
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/Quarter/SoQTQuarterAdaptor.h
Expand Up @@ -47,9 +47,9 @@ typedef void SoQTQuarterAdaptorCB(void* data, SoQTQuarterAdaptor* viewer);
class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget {

public:
explicit SoQTQuarterAdaptor(QWidget* parent = 0, const QtGLWidget* sharewidget = 0, Qt::WindowFlags f = 0);
explicit SoQTQuarterAdaptor(const QtGLFormat& format, QWidget* parent = 0, const QtGLWidget* shareWidget = 0, Qt::WindowFlags f = 0);
explicit SoQTQuarterAdaptor(QtGLContext* context, QWidget* parent = 0, const QtGLWidget* sharewidget = 0, Qt::WindowFlags f = 0);
explicit SoQTQuarterAdaptor(QWidget* parent = 0, const QtGLWidget* sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit SoQTQuarterAdaptor(const QtGLFormat& format, QWidget* parent = 0, const QtGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit SoQTQuarterAdaptor(QtGLContext* context, QWidget* parent = 0, const QtGLWidget* sharewidget = 0, Qt::WindowFlags f = Qt::WindowFlags());
virtual ~SoQTQuarterAdaptor();

//the functions available in soqtviewer but missing in quarter
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/SceneInspector.h
Expand Up @@ -71,7 +71,7 @@ class DlgInspector : public QDialog
Q_OBJECT

public:
DlgInspector(QWidget* parent = 0, Qt::WindowFlags fl = 0);
DlgInspector(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgInspector();

void setDocument(Gui::Document* doc);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Splashscreen.cpp
Expand Up @@ -826,7 +826,7 @@ void AboutDialog::on_copyButton_clicked()
/* TRANSLATOR Gui::LicenseView */

LicenseView::LicenseView(QWidget* parent)
: MDIView(0,parent,0)
: MDIView(0,parent,Qt::WindowFlags())
{
browser = new QTextBrowser(this);
browser->setOpenExternalLinks(true);
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Splashscreen.h
Expand Up @@ -42,7 +42,7 @@ class SplashScreen : public QSplashScreen
Q_OBJECT

public:
SplashScreen( const QPixmap & pixmap = QPixmap ( ), Qt::WindowFlags f = 0 );
SplashScreen( const QPixmap & pixmap = QPixmap ( ), Qt::WindowFlags f = Qt::WindowFlags() );
~SplashScreen();

protected:
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/SplitView3DInventor.h
Expand Up @@ -42,7 +42,7 @@ class GuiExport AbstractSplitView : public MDIView, public ParameterGrp::Observe
TYPESYSTEM_HEADER();

public:
AbstractSplitView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=0);
AbstractSplitView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags());
~AbstractSplitView();

virtual const char *getName(void) const;
Expand Down Expand Up @@ -109,7 +109,7 @@ class GuiExport SplitView3DInventor : public AbstractSplitView
TYPESYSTEM_HEADER();

public:
SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=0);
SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags());
~SplitView3DInventor();
};

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/TextureMapping.h
Expand Up @@ -39,7 +39,7 @@ class GuiExport TextureMapping : public QDialog
Q_OBJECT

public:
TextureMapping(QWidget* parent = 0, Qt::WindowFlags fl = 0);
TextureMapping(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~TextureMapping();
void accept();
void reject();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Transform.h
Expand Up @@ -71,7 +71,7 @@ class GuiExport Transform : public Gui::LocationDialog
Q_OBJECT

public:
Transform(QWidget* parent = 0, Qt::WindowFlags fl = 0);
Transform(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~Transform();
void accept();
void reject();
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/View3DInventor.h
Expand Up @@ -68,7 +68,7 @@ class GuiExport View3DInventor : public MDIView, public ParameterGrp::ObserverTy
TYPESYSTEM_HEADER();

public:
View3DInventor(Gui::Document* pcDocument, QWidget* parent, const QtGLWidget* sharewidget = 0, Qt::WindowFlags wflags=0);
View3DInventor(Gui::Document* pcDocument, QWidget* parent, const QtGLWidget* sharewidget = 0, Qt::WindowFlags wflags=Qt::WindowFlags());
~View3DInventor();

/// Message handler
Expand Down

0 comments on commit 81af54e

Please sign in to comment.