Compare commits
No commits in common. "399c27a452910e6a55b291d0ff7901ce23149638" and "fc92b963d484d11bd37522afdbfcc56e31023d7e" have entirely different histories.
399c27a452
...
fc92b963d4
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,18 +1,5 @@
|
|||||||
# looqs: Release notes
|
# looqs: Release notes
|
||||||
|
|
||||||
## 2022-06-14 - v0.3
|
|
||||||
CHANGES:
|
|
||||||
- GUI: Add settings tab to configure various settings
|
|
||||||
- GUI: Don't render previews for results that do not originate from a content search. This was confusing.
|
|
||||||
- GUI: Remove 'open config file' menu action
|
|
||||||
- GUI: Highlight "words" that are actually numbers in preview texts
|
|
||||||
- search: Search for "words" that are a number, e. g. 23. Previously, those were ignored due to a regression.
|
|
||||||
- CLI: Minor cleanups.
|
|
||||||
- sandbox: Improve preview generation sandbox further by restricting it more
|
|
||||||
- sandbox: Fix case where activiation would fail during indexing in some cases on kernels without landlock.
|
|
||||||
- Remove 'firstrun' setting
|
|
||||||
|
|
||||||
|
|
||||||
## 2022-06-07 - v0.2
|
## 2022-06-07 - v0.2
|
||||||
CHANGES:
|
CHANGES:
|
||||||
- Sandboxing: Add environment variable `LOOQS_DISABLE_SANDBOXING` to disable sandboxing. This is intended for troubleshooting
|
- Sandboxing: Add environment variable `LOOQS_DISABLE_SANDBOXING` to disable sandboxing. This is intended for troubleshooting
|
||||||
|
18
HACKING.md
18
HACKING.md
@ -3,31 +3,31 @@
|
|||||||
## Introduction
|
## Introduction
|
||||||
Without elaborating here, I hacked looqs because I was not satisfied with the state of desktop search on Linux.
|
Without elaborating here, I hacked looqs because I was not satisfied with the state of desktop search on Linux.
|
||||||
|
|
||||||
Originally a set of CLI python scripts, it is now written in C++ and offers a GUI made using Qt. While a "web app" would have been an option, I prefer a desktop application for something like looqs. I chose Qt because I am more familiar with it than with any other GUI framework. To my knowledge, potential alternatives like GTK do not include as many "batteries" as Qt anyway, so the job presumably would have been harder there,
|
Originally a set of CLI python scripts, it is now written in C++ and offers a GUI made using Qt. While a "web app" would have been an option, I prefer a desktop application for something like looqs. I chose Qt because I am more familiar with it than with any other GUI framework. To my knowledge, potential alternatives like GTK do not include as many "batteries" as Qt anyway, so the job presumably would have been harder there.
|
||||||
at least for me.
|
|
||||||
|
|
||||||
If you are interested in how to contribute, please see the file [CONTRIBUTING.md](CONTRIBUTING.md) which contains the instructions on how to submit patches etc.
|
[CONTRIBUTING.md](CONTRIBUTING.md) contains the instructions on how to submit patches etc.
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
The architecture ensures that the parsing of documents and the preview generation is sandboxed by [exile.h](https://github.com/quitesimpleorg/exile.h). looqs uses a multi-process architecture to achieve this.
|
The architecture ensures that the parsing of documents and the preview generation is sandboxed by [exile.h](https://github.com/quitesimpleorg/exile.h). looqs uses a multi-process architecture to achieve this.
|
||||||
|
|
||||||
Qt code is considered trusted in this model. While one may critize this, it was the only practical solution. looqs uses Qt's serialization mechanism and other classes to communicate between the non-sandboxed GUI process and the sandboxed processes.
|
Qt code is considered trusted in this model. While one may critize this, it was the only practical solution. looqs uses its serialization mechanism and other classes to communicate between the non-sandboxed GUI process and the sandboxed processes.
|
||||||
|
|
||||||
Set the enviornment variable `LOOQS_DISABLE_SANDBOX=1` to disable sandboxing. It's intended for troublehshooting.
|
Set the enviornment variable `LOOQS_DISABLE_SANDBOX=1` to disable sandboxing. It's intended for troublehshooting.
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
The heart is sqlite, with the FTS5 extensions behind the full-text search. While FTS may not be sqlite's strong suit, I definitly did not want to run one of those oftenly recommended heavy (Java based) solutions. I explored other options like Postgresql, I've discard them due to some limitations back then.
|
The heart is sqlite, with the FTS5 extensions behind the full-text search. I definitly did not
|
||||||
|
want to run some heavy Java based solutions. I explored other options like Postgresql, I've discard them due to some limitations back then.
|
||||||
|
|
||||||
Down the road, alternatives will be explored of course if sqlite should not suffice anymore.
|
Down the road, alternatives will be explored of course if sqlite should not suffice anymore.
|
||||||
|
|
||||||
## File format support
|
## File format support
|
||||||
The pdf library is libpoppler. Files such as .odt or .docx documents are opened with libquazip. The XML files in there are not parsed,
|
The pdf library is libpoppler. Files such as .odt or .docx documents are opened with libquazip. The XML files in there are not parsed,
|
||||||
looqs simply strips the tags and that seems to work fine so far. Naturally, this is not the "proper way", so there is room for improvement maybe here. However, those file formats are not a huge priortiy for me personally. libuchardet does encoding detection and conversion.
|
looqs simply strips the tags and that seems to work fine so far. Naturally, this is not the "proper way", so there is room for improvement maybehere. However, those file formats are not a huge priortiy for me personally. libuchardet does encoding detection and conversion.
|
||||||
|
|
||||||
Naturally, looqs won't be able to index and render previews for everything. Such approach would create a huge bloated binary. In the future, there will be some plugin system of some sorts, either we will load .so objects or use subprocesses.
|
Naturally looqs won't be able to index and render previews for everything. Such approach would create a huge bloated binary. In the future, there will be some plugin system of some sorts, either we will load .so objects or use subprocesses.
|
||||||
|
|
||||||
## Name
|
## Name
|
||||||
looqs looks for files. You as the user can also look inside them. The 'k' in "looks" was replaced by a 'q'. Originally, I wanted my projects to have "qs" (for quitesimple) in their name. While abandoned now, this got us to looqs.
|
looqs looks for files. You as the user can also look inside them. The 'k' was replaced by a 'q'. Originally wanted my projects to have "qs" (for quitesimple) in their name. While abandoned now, this got us to looqs.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ There is no need to write the long form of filters. There are also booleans avai
|
|||||||
|
|
||||||
|
|
||||||
## Current status
|
## Current status
|
||||||
Last version: 2022-06-14, v0.3
|
Last version: 2022-06-07, v0.2
|
||||||
|
|
||||||
Please see [Changelog](CHANGELOG.md) for a human readable list of changes.
|
Please see [Changelog](CHANGELOG.md) for a human readable list of changes.
|
||||||
|
|
||||||
|
33
gui/main.cpp
33
gui/main.cpp
@ -26,7 +26,8 @@ void enableIpcSandbox()
|
|||||||
policy->namespace_options = EXILE_UNSHARE_USER | EXILE_UNSHARE_MOUNT | EXILE_UNSHARE_NETWORK;
|
policy->namespace_options = EXILE_UNSHARE_USER | EXILE_UNSHARE_MOUNT | EXILE_UNSHARE_NETWORK;
|
||||||
policy->no_new_privs = 1;
|
policy->no_new_privs = 1;
|
||||||
policy->drop_caps = 1;
|
policy->drop_caps = 1;
|
||||||
policy->vow_promises = exile_vows_from_str("thread cpath rpath unix stdio proc error");
|
policy->vow_promises =
|
||||||
|
exile_vows_from_str("thread cpath wpath rpath unix stdio prot_exec proc shm fsnotify ioctl error");
|
||||||
policy->mount_path_policies_to_chroot = 1;
|
policy->mount_path_policies_to_chroot = 1;
|
||||||
|
|
||||||
QString ipcSocketPath = Common::ipcSocketPath();
|
QString ipcSocketPath = Common::ipcSocketPath();
|
||||||
@ -34,12 +35,6 @@ void enableIpcSandbox()
|
|||||||
QString ipcSocketPathDir = info.absolutePath();
|
QString ipcSocketPathDir = info.absolutePath();
|
||||||
std::string stdIpcSocketPath = ipcSocketPathDir.toStdString();
|
std::string stdIpcSocketPath = ipcSocketPathDir.toStdString();
|
||||||
|
|
||||||
/* we only need the 'server' side of the 'unix' vow (for unix sockets)'. The process
|
|
||||||
* has no business to connect anywhere.
|
|
||||||
*
|
|
||||||
* Maybe this case should be handled by exile at some point, but for now deal with it here */
|
|
||||||
exile_append_syscall_policy(policy, EXILE_SYS(connect), EXILE_SYSCALL_DENY_RET_ERROR, NULL, 0);
|
|
||||||
|
|
||||||
/* ALLOW_EXEC is needed for fallback, not in landlock mode. It does not allow executing anything though here
|
/* ALLOW_EXEC is needed for fallback, not in landlock mode. It does not allow executing anything though here
|
||||||
* due to the vows */
|
* due to the vows */
|
||||||
exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ | EXILE_FS_ALLOW_EXEC, "/");
|
exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ | EXILE_FS_ALLOW_EXEC, "/");
|
||||||
@ -48,26 +43,9 @@ void enableIpcSandbox()
|
|||||||
int ret = exile_enable_policy(policy);
|
int ret = exile_enable_policy(policy);
|
||||||
if(ret != 0)
|
if(ret != 0)
|
||||||
{
|
{
|
||||||
qDebug() << "Failed to establish sandbox" << Qt::endl;
|
qDebug() << "Failed to establish sandbox";
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Arguments are irrelevant for sandbox test, just want to silence analyzer/compiler warnings */
|
|
||||||
ret = socket(AF_INET, SOCK_STREAM, 0);
|
|
||||||
if(ret != -1 || errno != EACCES)
|
|
||||||
{
|
|
||||||
qCritical() << "Sandbox sanity check failed" << Qt::endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct sockaddr *addr = {};
|
|
||||||
ret = connect(3, addr, sizeof(*addr));
|
|
||||||
if(ret != -1 || errno != EACCES)
|
|
||||||
{
|
|
||||||
qCritical() << "Sandbox sanity check failed" << Qt::endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
exile_free_policy(policy);
|
exile_free_policy(policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +66,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
enableIpcSandbox();
|
enableIpcSandbox();
|
||||||
}
|
}
|
||||||
QCoreApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
IpcServer *ipcserver = new IpcServer();
|
IpcServer *ipcserver = new IpcServer();
|
||||||
qDebug() << "Launching IPC Server";
|
qDebug() << "Launching IPC Server";
|
||||||
@ -142,6 +120,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
Common::setupAppInfo();
|
Common::setupAppInfo();
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
|
parser.addOption({{"s", "no-sandbox"}, "Disable sandboxing"});
|
||||||
QStringList appArgs;
|
QStringList appArgs;
|
||||||
for(int i = 0; i < argc; i++)
|
for(int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
@ -149,7 +128,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
parser.parse(appArgs);
|
parser.parse(appArgs);
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Common::ensureConfigured();
|
Common::ensureConfigured();
|
||||||
@ -160,6 +138,7 @@ int main(int argc, char *argv[])
|
|||||||
QMessageBox::critical(nullptr, "Error", e.message);
|
QMessageBox::critical(nullptr, "Error", e.message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
QApplication a(argc, argv);
|
||||||
a.setWindowIcon(QIcon(":/looqs.svg"));
|
a.setWindowIcon(QIcon(":/looqs.svg"));
|
||||||
QObject::connect(&a, &QApplication::aboutToQuit, &process, &QProcess::kill);
|
QObject::connect(&a, &QApplication::aboutToQuit, &process, &QProcess::kill);
|
||||||
|
|
||||||
|
@ -192,6 +192,12 @@ void MainWindow::connectSignals()
|
|||||||
|
|
||||||
QMessageBox::about(this, "About looqs", html);
|
QMessageBox::about(this, "About looqs", html);
|
||||||
});
|
});
|
||||||
|
connect(ui->menuOpenConfigInTextEditorAction, &QAction::triggered, this,
|
||||||
|
[this](bool checked)
|
||||||
|
{
|
||||||
|
QSettings setting;
|
||||||
|
QDesktopServices::openUrl(setting.fileName());
|
||||||
|
});
|
||||||
connect(ui->menuAboutQtAction, &QAction::triggered, this,
|
connect(ui->menuAboutQtAction, &QAction::triggered, this,
|
||||||
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
|
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
|
||||||
connect(ui->menuSyncIndexAction, &QAction::triggered, this, &MainWindow::startIndexSync);
|
connect(ui->menuSyncIndexAction, &QAction::triggered, this, &MainWindow::startIndexSync);
|
||||||
@ -209,7 +215,6 @@ void MainWindow::connectSignals()
|
|||||||
});
|
});
|
||||||
connect(this, &MainWindow::beginIndexSync, indexSyncer, &IndexSyncer::sync);
|
connect(this, &MainWindow::beginIndexSync, indexSyncer, &IndexSyncer::sync);
|
||||||
connect(&this->progressDialog, &QProgressDialog::canceled, indexSyncer, &IndexSyncer::cancel);
|
connect(&this->progressDialog, &QProgressDialog::canceled, indexSyncer, &IndexSyncer::cancel);
|
||||||
connect(ui->btnSaveSettings, &QPushButton::clicked, this, &MainWindow::saveSettings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::startIndexSync()
|
void MainWindow::startIndexSync()
|
||||||
@ -231,7 +236,6 @@ void MainWindow::startIndexSync()
|
|||||||
|
|
||||||
emit beginIndexSync();
|
emit beginIndexSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::spinPreviewPageValueChanged(int val)
|
void MainWindow::spinPreviewPageValueChanged(int val)
|
||||||
{
|
{
|
||||||
makePreviews(val);
|
makePreviews(val);
|
||||||
@ -249,7 +253,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 +289,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);
|
||||||
}
|
}
|
||||||
@ -349,49 +351,6 @@ void MainWindow::tabChanged()
|
|||||||
makePreviews(ui->spinPreviewPage->value());
|
makePreviews(ui->spinPreviewPage->value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Settings tab active */
|
|
||||||
if(ui->tabWidget->currentIndex() == 3)
|
|
||||||
{
|
|
||||||
initSettingsTabs();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::initSettingsTabs()
|
|
||||||
{
|
|
||||||
QSettings settings;
|
|
||||||
|
|
||||||
QString pdfViewerCmd = settings.value(SETTINGS_KEY_PDFVIEWER).toString();
|
|
||||||
QString excludedPaths = Common::excludedPaths().join(';');
|
|
||||||
QString mountPaths = Common::mountPaths().join(';');
|
|
||||||
QString databasePath = Common::databasePath();
|
|
||||||
int numPagesPerPreview = settings.value(SETTINGS_KEY_PREVIEWSPERPAGE, 20).toInt();
|
|
||||||
|
|
||||||
ui->txtSettingPdfPreviewerCmd->setText(pdfViewerCmd);
|
|
||||||
ui->txtSettingIgnoredPaths->setText(excludedPaths);
|
|
||||||
ui->txtSettingMountPaths->setText(mountPaths);
|
|
||||||
ui->spinSettingNumerPerPages->setValue(numPagesPerPreview);
|
|
||||||
ui->txtSettingDatabasePath->setText(databasePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::saveSettings()
|
|
||||||
{
|
|
||||||
QSettings settings;
|
|
||||||
|
|
||||||
QString pdfViewerCmd = ui->txtSettingPdfPreviewerCmd->text();
|
|
||||||
QStringList excludedPaths = ui->txtSettingIgnoredPaths->text().split(';');
|
|
||||||
QStringList mountPaths = ui->txtSettingMountPaths->text().split(';');
|
|
||||||
QString databasePath = ui->txtSettingDatabasePath->text();
|
|
||||||
|
|
||||||
settings.setValue(SETTINGS_KEY_PDFVIEWER, pdfViewerCmd);
|
|
||||||
settings.setValue(SETTINGS_KEY_EXCLUDEDPATHS, excludedPaths);
|
|
||||||
settings.setValue(SETTINGS_KEY_MOUNTPATHS, mountPaths);
|
|
||||||
settings.setValue(SETTINGS_KEY_PREVIEWSPERPAGE, ui->spinSettingNumerPerPages->value());
|
|
||||||
settings.setValue(SETTINGS_KEY_DBPATH, databasePath);
|
|
||||||
|
|
||||||
settings.sync();
|
|
||||||
|
|
||||||
QProcess::startDetached(qApp->arguments()[0], qApp->arguments().mid(1));
|
|
||||||
qApp->quit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::previewReceived(QSharedPointer<PreviewResult> preview, unsigned int previewGeneration)
|
void MainWindow::previewReceived(QSharedPointer<PreviewResult> preview, unsigned int previewGeneration)
|
||||||
@ -430,7 +389,7 @@ void MainWindow::lineEditReturnPressed()
|
|||||||
ui->lblSearchResults->setText("Invalid paranthesis");
|
ui->lblSearchResults->setText("Invalid paranthesis");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(ui->tabWidget->currentIndex() > 1)
|
if(indexerTabActive())
|
||||||
{
|
{
|
||||||
ui->tabWidget->setCurrentIndex(0);
|
ui->tabWidget->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
@ -495,11 +454,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)
|
||||||
@ -548,7 +502,7 @@ void MainWindow::makePreviews(int page)
|
|||||||
scaleText.chop(1);
|
scaleText.chop(1);
|
||||||
|
|
||||||
QVector<QString> wordsToHighlight;
|
QVector<QString> wordsToHighlight;
|
||||||
QRegularExpression extractor(R"#("([^"]*)"|((\p{L}|\p{N})+))#");
|
QRegularExpression extractor(R"#("([^"]*)"|(\p{L}+))#");
|
||||||
for(const Token &token : this->contentSearchQuery.getTokens())
|
for(const Token &token : this->contentSearchQuery.getTokens())
|
||||||
{
|
{
|
||||||
if(token.type == FILTER_CONTENT_CONTAINS)
|
if(token.type == FILTER_CONTENT_CONTAINS)
|
||||||
|
@ -61,7 +61,6 @@ class MainWindow : public QMainWindow
|
|||||||
void openDocument(QString path, int num);
|
void openDocument(QString path, int num);
|
||||||
void openFile(QString path);
|
void openFile(QString path);
|
||||||
unsigned int currentPreviewGeneration = 1;
|
unsigned int currentPreviewGeneration = 1;
|
||||||
void initSettingsTabs();
|
|
||||||
private slots:
|
private slots:
|
||||||
void lineEditReturnPressed();
|
void lineEditReturnPressed();
|
||||||
void treeSearchItemActivated(QTreeWidgetItem *item, int i);
|
void treeSearchItemActivated(QTreeWidgetItem *item, int i);
|
||||||
@ -74,7 +73,6 @@ class MainWindow : public QMainWindow
|
|||||||
void finishIndexing();
|
void finishIndexing();
|
||||||
void addPathToIndex();
|
void addPathToIndex();
|
||||||
void startIndexSync();
|
void startIndexSync();
|
||||||
void saveSettings();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void startIpcPreviews(RenderConfig config, const QVector<RenderTarget> &targets);
|
void startIpcPreviews(RenderConfig config, const QVector<RenderTarget> &targets);
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1280</width>
|
<width>1221</width>
|
||||||
<height>736</height>
|
<height>709</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="resultsTab">
|
<widget class="QWidget" name="resultsTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -81,8 +81,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1244</width>
|
<width>1185</width>
|
||||||
<height>446</height>
|
<height>419</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||||
@ -344,145 +344,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="settingsTab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Settings</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupPdfSettings">
|
|
||||||
<property name="title">
|
|
||||||
<string>PDF Viewer</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Command to open PDF pages in (%f = file path; %p = page number)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="txtSettingPdfPreviewerCmd"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupMountPaths">
|
|
||||||
<property name="title">
|
|
||||||
<string>Mount paths</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lblMountPaths">
|
|
||||||
<property name="text">
|
|
||||||
<string>Path prefixes of files that should not be removed during sync, even if they cannot be accessed (e . g. files indexed on external disks) . Separated by ;</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="txtSettingMountPaths"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Ignored paths</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Path prefixes that should always be ignored during indexing (will be applied before the ignore patterns). Separated by ;</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="txtSettingIgnoredPaths"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupSettingDatabasePath">
|
|
||||||
<property name="title">
|
|
||||||
<string>Database path</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lblSettingDatabasePath">
|
|
||||||
<property name="text">
|
|
||||||
<string>Path of the database. Note: Changing it here will create an empty, new database. The old will not be moved. </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="txtSettingDatabasePath"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="Misc">
|
|
||||||
<property name="title">
|
|
||||||
<string>Misc</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Max number of previews per 'page' in 'Previews' tab: </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="spinSettingNumerPerPages"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnSaveSettings">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save settings and restart</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -507,7 +368,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1280</width>
|
<width>1221</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -515,6 +376,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>looqs</string>
|
<string>looqs</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="menuOpenConfigInTextEditorAction"/>
|
||||||
<addaction name="menuSyncIndexAction"/>
|
<addaction name="menuSyncIndexAction"/>
|
||||||
<addaction name="menuAboutAction"/>
|
<addaction name="menuAboutAction"/>
|
||||||
<addaction name="menuAboutQtAction"/>
|
<addaction name="menuAboutQtAction"/>
|
||||||
@ -527,6 +389,11 @@
|
|||||||
<string>About</string>
|
<string>About</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="menuOpenConfigInTextEditorAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open config in text editor</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="menuAboutQtAction">
|
<action name="menuAboutQtAction">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>About Qt</string>
|
<string>About Qt</string>
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
#include "databasefactory.h"
|
#include "databasefactory.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
||||||
|
#define SETTINGS_KEY_DBPATH "dbpath"
|
||||||
|
#define SETTINGS_KEY_FIRSTRUN "firstrun"
|
||||||
|
#define SETTINGS_KEY_IPCSOCKETPATH "ipcsocketpath"
|
||||||
|
#define SETTINGS_KEY_PDFVIEWER "pdfviewer"
|
||||||
|
#define SETTINGS_KEY_EXCLUDEDPATHS "excludedpaths"
|
||||||
|
#define SETTINGS_KEY_MOUNTPATHS "mountpaths"
|
||||||
|
|
||||||
inline void initResources()
|
inline void initResources()
|
||||||
{
|
{
|
||||||
Q_INIT_RESOURCE(migrations);
|
Q_INIT_RESOURCE(migrations);
|
||||||
@ -84,10 +91,10 @@ void Common::setPdfViewer()
|
|||||||
void Common::ensureConfigured()
|
void Common::ensureConfigured()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString dbpath = databasePath();
|
QVariant firstRun = settings.value(SETTINGS_KEY_FIRSTRUN);
|
||||||
if(dbpath == "")
|
if(!firstRun.isValid())
|
||||||
{
|
{
|
||||||
dbpath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
|
QString dbpath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
|
||||||
QDir dir;
|
QDir dir;
|
||||||
if(!dir.exists(dbpath))
|
if(!dir.exists(dbpath))
|
||||||
{
|
{
|
||||||
@ -97,35 +104,39 @@ void Common::ensureConfigured()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbpath += "/looqs.sqlite";
|
dbpath += "/looqs.sqlite";
|
||||||
}
|
|
||||||
if(!QFile::exists(dbpath))
|
|
||||||
{
|
|
||||||
if(!initSqliteDatabase(dbpath))
|
if(!initSqliteDatabase(dbpath))
|
||||||
{
|
{
|
||||||
throw LooqsGeneralException("Failed to initialize sqlite database");
|
throw LooqsGeneralException("Failed to initialize sqlite database");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.setValue(SETTINGS_KEY_FIRSTRUN, false);
|
||||||
settings.setValue(SETTINGS_KEY_DBPATH, dbpath);
|
settings.setValue(SETTINGS_KEY_DBPATH, dbpath);
|
||||||
}
|
|
||||||
DatabaseFactory factory{dbpath};
|
|
||||||
auto db = factory.forCurrentThread();
|
|
||||||
DBMigrator migrator{db};
|
|
||||||
if(migrator.migrationNeeded())
|
|
||||||
{
|
|
||||||
QFile out;
|
|
||||||
out.open(stderr, QIODevice::WriteOnly);
|
|
||||||
Logger migrationLogger{&out};
|
|
||||||
migrationLogger << "Database is being upgraded, please be patient..." << Qt::endl;
|
|
||||||
QObject::connect(&migrator, &DBMigrator::migrationDone,
|
|
||||||
[&migrationLogger](uint32_t migration)
|
|
||||||
{ migrationLogger << "Progress: Successfully migrated to: " << migration << Qt::endl; });
|
|
||||||
migrator.performMigrations();
|
|
||||||
migrationLogger << "Database upgraded successfully" << Qt::endl;
|
|
||||||
}
|
|
||||||
QVariant pdfViewer = settings.value(SETTINGS_KEY_PDFVIEWER);
|
|
||||||
if(!pdfViewer.isValid())
|
|
||||||
{
|
|
||||||
setPdfViewer();
|
setPdfViewer();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
QString dbpath = databasePath();
|
||||||
|
if(!QFile::exists(dbpath))
|
||||||
|
{
|
||||||
|
throw LooqsGeneralException("Database " + dbpath + " was not found");
|
||||||
|
}
|
||||||
|
DatabaseFactory factory{dbpath};
|
||||||
|
auto db = factory.forCurrentThread();
|
||||||
|
DBMigrator migrator{db};
|
||||||
|
if(migrator.migrationNeeded())
|
||||||
|
{
|
||||||
|
QFile out;
|
||||||
|
out.open(stderr, QIODevice::WriteOnly);
|
||||||
|
Logger migrationLogger{&out};
|
||||||
|
migrationLogger << "Database is being upgraded, please be patient..." << Qt::endl;
|
||||||
|
QObject::connect(&migrator, &DBMigrator::migrationDone,
|
||||||
|
[&migrationLogger](uint32_t migration)
|
||||||
|
{ migrationLogger << "Progress: Successfully migrated to: " << migration << Qt::endl; });
|
||||||
|
migrator.performMigrations();
|
||||||
|
migrationLogger << "Database upgraded successfully" << Qt::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Common::setupAppInfo()
|
void Common::setupAppInfo()
|
||||||
@ -165,18 +176,19 @@ QString Common::ipcSocketPath()
|
|||||||
// return settings.value(SETTINGS_KEY_IPCSOCKETPATH, "/tmp/.looqs/looqs-ipc-socket").toString();
|
// return settings.value(SETTINGS_KEY_IPCSOCKETPATH, "/tmp/.looqs/looqs-ipc-socket").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QStringList excludedPaths = {"/proc", "/sys", "/dev", "/tmp", "/var/run", "/run"};
|
||||||
|
|
||||||
QStringList Common::excludedPaths()
|
QStringList Common::excludedPaths()
|
||||||
{
|
{
|
||||||
static int ran = false;
|
static int ran = false;
|
||||||
static QStringList excludedPaths;
|
|
||||||
if(!ran)
|
if(!ran)
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QStringList defaults{"/proc", "/sys", "/dev", "/tmp", "/var/run", "/run"};
|
QStringList userExcludedPaths = settings.value(SETTINGS_KEY_EXCLUDEDPATHS).toStringList();
|
||||||
excludedPaths = settings.value(SETTINGS_KEY_EXCLUDEDPATHS, defaults).toStringList();
|
|
||||||
ran = true;
|
ran = true;
|
||||||
|
::excludedPaths.append(userExcludedPaths);
|
||||||
}
|
}
|
||||||
return excludedPaths;
|
return ::excludedPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList Common::mountPaths()
|
QStringList Common::mountPaths()
|
||||||
|
@ -2,14 +2,6 @@
|
|||||||
#define COMMON_H
|
#define COMMON_H
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
#define SETTINGS_KEY_DBPATH "dbpath"
|
|
||||||
#define SETTINGS_KEY_IPCSOCKETPATH "ipcsocketpath"
|
|
||||||
#define SETTINGS_KEY_PDFVIEWER "pdfviewer"
|
|
||||||
#define SETTINGS_KEY_EXCLUDEDPATHS "excludedpaths"
|
|
||||||
#define SETTINGS_KEY_MOUNTPATHS "mountpaths"
|
|
||||||
#define SETTINGS_KEY_PREVIEWSPERPAGE "previewsPerPage"
|
|
||||||
|
|
||||||
namespace Common
|
namespace Common
|
||||||
{
|
{
|
||||||
void setupAppInfo();
|
void setupAppInfo();
|
||||||
|
@ -19,21 +19,7 @@ void Indexer::beginIndexing()
|
|||||||
QVector<QString> dirs;
|
QVector<QString> dirs;
|
||||||
|
|
||||||
WildcardMatcher wildcardMatcher;
|
WildcardMatcher wildcardMatcher;
|
||||||
|
wildcardMatcher.setPatterns(this->ignorePattern);
|
||||||
QStringList ignoreList = this->ignorePattern;
|
|
||||||
|
|
||||||
for(QString &excludedPath : Common::excludedPaths())
|
|
||||||
{
|
|
||||||
QString pattern = excludedPath;
|
|
||||||
if(!pattern.endsWith("/"))
|
|
||||||
{
|
|
||||||
pattern += "/";
|
|
||||||
}
|
|
||||||
pattern += "*";
|
|
||||||
ignoreList.append(excludedPath);
|
|
||||||
}
|
|
||||||
ignoreList.append(this->ignorePattern);
|
|
||||||
wildcardMatcher.setPatterns(ignoreList);
|
|
||||||
for(QString &path : this->pathsToScan)
|
for(QString &path : this->pathsToScan)
|
||||||
{
|
{
|
||||||
if(wildcardMatcher.match(path))
|
if(wildcardMatcher.match(path))
|
||||||
@ -54,7 +40,7 @@ void Indexer::beginIndexing()
|
|||||||
if(!dirs.empty())
|
if(!dirs.empty())
|
||||||
{
|
{
|
||||||
this->dirScanner->setPaths(dirs);
|
this->dirScanner->setPaths(dirs);
|
||||||
this->dirScanner->setIgnorePatterns(ignoreList);
|
this->dirScanner->setIgnorePatterns(this->ignorePattern);
|
||||||
|
|
||||||
this->dirScanner->scan();
|
this->dirScanner->scan();
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
@ -181,8 +181,8 @@ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, b
|
|||||||
QStringList loneWords;
|
QStringList loneWords;
|
||||||
LooqsQuery result;
|
LooqsQuery result;
|
||||||
QRegularExpression rx(
|
QRegularExpression rx(
|
||||||
"((?<filtername>(\\.|\\w)+):(?<args>\\((?<innerargs>[^\\)]+)\\)|([\\p{L}\\p{N},])+)|(?<boolean>AND|OR)"
|
"((?<filtername>(\\.|\\w)+):(?<args>\\((?<innerargs>[^\\)]+)\\)|([\\p{L},])+)|(?<boolean>AND|OR)"
|
||||||
"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>[\"\\p{L}\\p{N}]+))");
|
"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>[\"\\p{L}]+))");
|
||||||
QRegularExpressionMatchIterator i = rx.globalMatch(expression);
|
QRegularExpressionMatchIterator i = rx.globalMatch(expression);
|
||||||
auto previousWasBool = [&result] { return !result.tokens.empty() && ((result.tokens.last().type & BOOL) == BOOL); };
|
auto previousWasBool = [&result] { return !result.tokens.empty() && ((result.tokens.last().type & BOOL) == BOOL); };
|
||||||
auto previousWas = [&result](TokenType t) { return !result.tokens.empty() && (result.tokens.last().type == t); };
|
auto previousWas = [&result](TokenType t) { return !result.tokens.empty() && (result.tokens.last().type == t); };
|
||||||
|
@ -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);
|
||||||
|
@ -35,7 +35,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath)
|
|||||||
struct exile_policy *policy = exile_init_policy();
|
struct exile_policy *policy = exile_init_policy();
|
||||||
if(policy == NULL)
|
if(policy == NULL)
|
||||||
{
|
{
|
||||||
qCritical() << "Could not init exile" << Qt::endl;
|
qCritical() << "Could not init exile";
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER;
|
policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER;
|
||||||
@ -43,8 +43,6 @@ void SandboxedProcessor::enableSandbox(QString readablePath)
|
|||||||
std::string readablePathLocation;
|
std::string readablePathLocation;
|
||||||
if(!readablePath.isEmpty())
|
if(!readablePath.isEmpty())
|
||||||
{
|
{
|
||||||
policy->namespace_options |= EXILE_UNSHARE_MOUNT;
|
|
||||||
policy->mount_path_policies_to_chroot = 1;
|
|
||||||
readablePathLocation = readablePath.toStdString();
|
readablePathLocation = readablePath.toStdString();
|
||||||
if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0)
|
if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0)
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 8f38dc4480d51e2bf737ef87dd4a4f408d90a8a6
|
Subproject commit 42d44b0cc1e4ef35d0429e43a1dd005556450b44
|
Loading…
Reference in New Issue
Block a user