Changeset View
Changeset View
Standalone View
Standalone View
src/kfinddlg.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 43 | { | |||
---|---|---|---|---|---|
103 | connect(m_stopButton, &QPushButton::clicked, this, &KfindDlg::stopSearch); | 103 | connect(m_stopButton, &QPushButton::clicked, this, &KfindDlg::stopSearch); | ||
104 | connect(m_saveAsButton, &QPushButton::clicked, win, &KFindTreeView::saveResults); | 104 | connect(m_saveAsButton, &QPushButton::clicked, win, &KFindTreeView::saveResults); | ||
105 | 105 | | |||
106 | connect(buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &KfindDlg::finishAndClose); | 106 | connect(buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &KfindDlg::finishAndClose); | ||
107 | 107 | | |||
108 | connect(win, &KFindTreeView::resultSelected, this, &KfindDlg::resultSelected); | 108 | connect(win, &KFindTreeView::resultSelected, this, &KfindDlg::resultSelected); | ||
109 | 109 | | |||
110 | query = new KQuery(frame); | 110 | query = new KQuery(frame); | ||
111 | connect(query, SIGNAL(result(int)), SLOT(slotResult(int))); | 111 | connect(query, &KQuery::result, this, &KfindDlg::slotResult); | ||
112 | connect(query, SIGNAL(foundFileList(QList<QPair<KFileItem,QString> >)), SLOT(addFiles(QList<QPair<KFileItem,QString> >))); | 112 | connect(query, &KQuery::foundFileList, this, &KfindDlg::addFiles); | ||
113 | 113 | | |||
114 | KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true); | 114 | KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true); | ||
115 | buttonBox->button(QDialogButtonBox::Help)->setMenu(helpMenu->menu()); | 115 | buttonBox->button(QDialogButtonBox::Help)->setMenu(helpMenu->menu()); | ||
116 | dirwatch = NULL; | 116 | dirwatch = NULL; | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | KfindDlg::~KfindDlg() | 119 | KfindDlg::~KfindDlg() | ||
120 | { | 120 | { | ||
Show All 32 Lines | 144 | { | |||
153 | emit haveResults(false); | 153 | emit haveResults(false); | ||
154 | 154 | | |||
155 | m_findButton->setEnabled(false); // Disable "Find" | 155 | m_findButton->setEnabled(false); // Disable "Find" | ||
156 | m_stopButton->setEnabled(true); // Enable "Stop" | 156 | m_stopButton->setEnabled(true); // Enable "Stop" | ||
157 | m_saveAsButton->setEnabled(false); // Disable "Save As..." | 157 | m_saveAsButton->setEnabled(false); // Disable "Save As..." | ||
158 | 158 | | |||
159 | delete dirwatch; | 159 | delete dirwatch; | ||
160 | dirwatch = new KDirWatch(); | 160 | dirwatch = new KDirWatch(); | ||
161 | connect(dirwatch, SIGNAL(created(QString)), this, SLOT(slotNewItems(QString))); | 161 | connect(dirwatch, &KDirWatch::created, this, &KfindDlg::slotNewItems); | ||
162 | connect(dirwatch, SIGNAL(deleted(QString)), this, SLOT(slotDeleteItem(QString))); | 162 | connect(dirwatch, &KDirWatch::deleted, this, &KfindDlg::slotDeleteItem); | ||
163 | dirwatch->addDir(query->url().toLocalFile(), KDirWatch::WatchFiles); | 163 | dirwatch->addDir(query->url().toLocalFile(), KDirWatch::WatchFiles); | ||
164 | 164 | | |||
165 | #if 0 | 165 | #if 0 | ||
166 | // waba: Watching for updates is disabled for now because even with FAM it causes too | 166 | // waba: Watching for updates is disabled for now because even with FAM it causes too | ||
167 | // much problems. See BR68220, BR77854, BR77846, BR79512 and BR85802 | 167 | // much problems. See BR68220, BR77854, BR77846, BR79512 and BR85802 | ||
168 | // There are 3 problems: | 168 | // There are 3 problems: | ||
169 | // 1) addDir() keeps looping on recursive symlinks | 169 | // 1) addDir() keeps looping on recursive symlinks | ||
170 | // 2) addDir() scans all subdirectories, so it basically does the same as the process that | 170 | // 2) addDir() scans all subdirectories, so it basically does the same as the process that | ||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |