Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

porting: remove deprecated flag init #69

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/editreplacewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void ReplaceWidget::doFind()
if (ui.comboBoxFind->findText(currentText) < 0)
ui.comboBoxFind->addItem(currentText);

QTextDocument::FindFlags flags = 0;
QTextDocument::FindFlags flags = QTextDocument::FindFlags();
if (ui.checkBoxCaseSensitive->isChecked())
flags |= QTextDocument::FindCaseSensitively;
if (ui.checkBoxWholeWords->isChecked())
Expand All @@ -112,7 +112,7 @@ void ReplaceWidget::doReplace()
if (ui.comboBoxReplace->findText(replacementText) < 0)
ui.comboBoxReplace->addItem(replacementText);

QTextDocument::FindFlags flags = 0;
QTextDocument::FindFlags flags = QTextDocument::FindFlags();
if (ui.checkBoxCaseSensitive->isChecked())
flags |= QTextDocument::FindCaseSensitively;
if (ui.checkBoxWholeWords->isChecked())
Expand Down
2 changes: 1 addition & 1 deletion app/tikzeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void TikzEditor::keyPressEvent(QKeyEvent *event)
else if (event->key() == Qt::Key_Tab || event->key() == Qt::Key_Backtab) {
QTextCursor cursor = textCursor();
QTextBlock block = cursor.block();
QTextDocument::FindFlags flags = 0;
QTextDocument::FindFlags flags = QTextDocument::FindFlags();
if (event->key() == Qt::Key_Backtab)
flags = QTextDocument::FindBackward;
if (cursor.hasSelection() && cursor.selectedText().contains(QChar::ParagraphSeparator)) {
Expand Down
7 changes: 4 additions & 3 deletions app/tikzeditorview.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ private Q_SLOTS:
void editReplace();
void tabIndent(bool isUnindenting = false);
void indent(QChar insertChar, int numOfInserts, bool isUnindenting = false);
bool search(const QString &text, QTextDocument::FindFlags flags = 0, bool startAtCursor = true,
bool continueFromBeginning = false);
bool search(const QString &text, QTextDocument::FindFlags flags = QTextDocument::FindFlags(),
bool startAtCursor = true, bool continueFromBeginning = false);
void search();
void replace(const QString &replacement);
void replace(const QString &text, const QString &replacement,
QTextDocument::FindFlags flags = 0, bool startAtCursor = true);
QTextDocument::FindFlags flags = QTextDocument::FindFlags(),
bool startAtCursor = true);
void replace();
void replaceAll();

Expand Down
2 changes: 1 addition & 1 deletion common/utils/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class File : public QObject
File(const QUrl &url, const OpenMode &mode);
~File();

bool open(const QFile::OpenMode &mode = 0);
bool open(const QFile::OpenMode &mode = QFile::OpenMode());
bool close();
QFile *file();
QString errorString() const;
Expand Down