Compare commits
No commits in common. "8ba4ee5847ace3e57e46d938b4cc57bb88e0ca10" and "0d2e518000e2e1b771a897da819d63479084501a" have entirely different histories.
8ba4ee5847
...
0d2e518000
@ -249,7 +249,6 @@ void MainWindow::startIndexing()
|
|||||||
|
|
||||||
ui->previewsTab->setEnabled(false);
|
ui->previewsTab->setEnabled(false);
|
||||||
ui->resultsTab->setEnabled(false);
|
ui->resultsTab->setEnabled(false);
|
||||||
ui->settingsTab->setEnabled(false);
|
|
||||||
ui->txtPathScanAdd->setEnabled(false);
|
ui->txtPathScanAdd->setEnabled(false);
|
||||||
ui->txtSearch->setEnabled(false);
|
ui->txtSearch->setEnabled(false);
|
||||||
ui->previewProcessBar->setValue(0);
|
ui->previewProcessBar->setValue(0);
|
||||||
@ -286,7 +285,6 @@ void MainWindow::finishIndexing()
|
|||||||
ui->btnStartIndexing->setText("Start indexing");
|
ui->btnStartIndexing->setText("Start indexing");
|
||||||
ui->previewsTab->setEnabled(true);
|
ui->previewsTab->setEnabled(true);
|
||||||
ui->resultsTab->setEnabled(true);
|
ui->resultsTab->setEnabled(true);
|
||||||
ui->settingsTab->setEnabled(true);
|
|
||||||
ui->txtPathScanAdd->setEnabled(true);
|
ui->txtPathScanAdd->setEnabled(true);
|
||||||
ui->txtSearch->setEnabled(true);
|
ui->txtSearch->setEnabled(true);
|
||||||
}
|
}
|
||||||
@ -491,11 +489,6 @@ void MainWindow::handleSearchResults(const QVector<SearchResult> &results)
|
|||||||
bool exists = pathInfo.exists();
|
bool exists = pathInfo.exists();
|
||||||
if(exists)
|
if(exists)
|
||||||
{
|
{
|
||||||
if(!result.wasContentSearch)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!pathInfo.suffix().contains("htm")) // hack until we can preview them properly...
|
if(!pathInfo.suffix().contains("htm")) // hack until we can preview them properly...
|
||||||
{
|
{
|
||||||
if(PreviewGenerator::get(pathInfo) != nullptr)
|
if(PreviewGenerator::get(pathInfo) != nullptr)
|
||||||
|
@ -23,12 +23,12 @@ QueryType LooqsQuery::getQueryType()
|
|||||||
return static_cast<QueryType>(tokensMask & COMBINED);
|
return static_cast<QueryType>(tokensMask & COMBINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LooqsQuery::hasContentSearch() const
|
bool LooqsQuery::hasContentSearch()
|
||||||
{
|
{
|
||||||
return (this->getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT;
|
return (this->getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LooqsQuery::hasPathSearch() const
|
bool LooqsQuery::hasPathSearch()
|
||||||
{
|
{
|
||||||
return (this->getTokensMask() & FILTER_PATH) == FILTER_PATH;
|
return (this->getTokensMask() & FILTER_PATH) == FILTER_PATH;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,8 @@ class LooqsQuery
|
|||||||
{
|
{
|
||||||
this->limit = limit;
|
this->limit = limit;
|
||||||
}
|
}
|
||||||
bool hasContentSearch() const;
|
bool hasContentSearch();
|
||||||
bool hasPathSearch() const;
|
bool hasPathSearch();
|
||||||
|
|
||||||
void addSortCondition(SortCondition sc);
|
void addSortCondition(SortCondition sc);
|
||||||
static bool checkParanthesis(QString query);
|
static bool checkParanthesis(QString query);
|
||||||
|
@ -7,7 +7,6 @@ class SearchResult
|
|||||||
public:
|
public:
|
||||||
FileData fileData;
|
FileData fileData;
|
||||||
QVector<unsigned int> pages;
|
QVector<unsigned int> pages;
|
||||||
bool wasContentSearch = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SEARCHRESULT_H
|
#endif // SEARCHRESULT_H
|
||||||
|
@ -213,7 +213,6 @@ QVector<SearchResult> SqliteSearch::search(const LooqsQuery &query)
|
|||||||
throw LooqsGeneralException("SQL Error: " + dbQuery.lastError().text());
|
throw LooqsGeneralException("SQL Error: " + dbQuery.lastError().text());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool contentSearch = query.hasContentSearch();
|
|
||||||
while(dbQuery.next())
|
while(dbQuery.next())
|
||||||
{
|
{
|
||||||
SearchResult result;
|
SearchResult result;
|
||||||
@ -230,7 +229,6 @@ QVector<SearchResult> SqliteSearch::search(const LooqsQuery &query)
|
|||||||
result.pages.append(page.toUInt());
|
result.pages.append(page.toUInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.wasContentSearch = contentSearch;
|
|
||||||
results.append(result);
|
results.append(result);
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
|
Loading…
Reference in New Issue
Block a user