mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
Each time the searched term or the dialog is closed, the find process in the QScintilla widget is cancelled. This avoids the problem mentioned in issue #1612 and similar others, like finding, then changing the searched term and pressing Replace. In all these cases Replace only finds the next term to be replaced without performing any actual replacement.
44 lines
832 B
C++
44 lines
832 B
C++
#ifndef FindReplaceDialog_H
|
|
#define FindReplaceDialog_H
|
|
|
|
#include <ExtendedScintilla.h>
|
|
|
|
#include <QDialog>
|
|
#include <QAbstractButton>
|
|
|
|
namespace Ui {
|
|
class FindReplaceDialog;
|
|
}
|
|
|
|
class FindReplaceDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit FindReplaceDialog(QWidget* parent = nullptr);
|
|
~FindReplaceDialog() override;
|
|
void setExtendedScintilla(ExtendedScintilla* scintilla);
|
|
void show();
|
|
|
|
private slots:
|
|
bool findNext();
|
|
void replace();
|
|
void findAll();
|
|
void replaceAll();
|
|
void cancelFind();
|
|
void help();
|
|
void close();
|
|
void reject() override;
|
|
void buttonBox_clicked(QAbstractButton* button);
|
|
|
|
private:
|
|
void indicateSelection();
|
|
void clearIndicators();
|
|
Ui::FindReplaceDialog* ui;
|
|
ExtendedScintilla* m_scintilla;
|
|
int foundIndicatorNumber;
|
|
};
|
|
|
|
#endif
|