Σύγκριση υποβολών
	
		
			3 Υποβολές
		
	
	
		
			8ba4ee5847
			...
			11decb757f
		
	
	| Συγγραφέας | SHA1 | Ημερομηνία | |
|---|---|---|---|
| 11decb757f | |||
| b71c234fb4 | |||
| bc908a1038 | 
| @@ -363,12 +363,14 @@ void MainWindow::initSettingsTabs() | |||||||
| 	QString pdfViewerCmd = settings.value(SETTINGS_KEY_PDFVIEWER).toString(); | 	QString pdfViewerCmd = settings.value(SETTINGS_KEY_PDFVIEWER).toString(); | ||||||
| 	QString excludedPaths = Common::excludedPaths().join(';'); | 	QString excludedPaths = Common::excludedPaths().join(';'); | ||||||
| 	QString mountPaths = Common::mountPaths().join(';'); | 	QString mountPaths = Common::mountPaths().join(';'); | ||||||
|  | 	QString databasePath = Common::databasePath(); | ||||||
| 	int numPagesPerPreview = settings.value(SETTINGS_KEY_PREVIEWSPERPAGE, 20).toInt(); | 	int numPagesPerPreview = settings.value(SETTINGS_KEY_PREVIEWSPERPAGE, 20).toInt(); | ||||||
|  |  | ||||||
| 	ui->txtSettingPdfPreviewerCmd->setText(pdfViewerCmd); | 	ui->txtSettingPdfPreviewerCmd->setText(pdfViewerCmd); | ||||||
| 	ui->txtSettingIgnoredPaths->setText(excludedPaths); | 	ui->txtSettingIgnoredPaths->setText(excludedPaths); | ||||||
| 	ui->txtSettingMountPaths->setText(mountPaths); | 	ui->txtSettingMountPaths->setText(mountPaths); | ||||||
| 	ui->spinSettingNumerPerPages->setValue(numPagesPerPreview); | 	ui->spinSettingNumerPerPages->setValue(numPagesPerPreview); | ||||||
|  | 	ui->txtSettingDatabasePath->setText(databasePath); | ||||||
| } | } | ||||||
|  |  | ||||||
| void MainWindow::saveSettings() | void MainWindow::saveSettings() | ||||||
| @@ -378,11 +380,13 @@ void MainWindow::saveSettings() | |||||||
| 	QString pdfViewerCmd = ui->txtSettingPdfPreviewerCmd->text(); | 	QString pdfViewerCmd = ui->txtSettingPdfPreviewerCmd->text(); | ||||||
| 	QStringList excludedPaths = ui->txtSettingIgnoredPaths->text().split(';'); | 	QStringList excludedPaths = ui->txtSettingIgnoredPaths->text().split(';'); | ||||||
| 	QStringList mountPaths = ui->txtSettingMountPaths->text().split(';'); | 	QStringList mountPaths = ui->txtSettingMountPaths->text().split(';'); | ||||||
|  | 	QString databasePath = ui->txtSettingDatabasePath->text(); | ||||||
|  |  | ||||||
| 	settings.setValue(SETTINGS_KEY_PDFVIEWER, pdfViewerCmd); | 	settings.setValue(SETTINGS_KEY_PDFVIEWER, pdfViewerCmd); | ||||||
| 	settings.setValue(SETTINGS_KEY_EXCLUDEDPATHS, excludedPaths); | 	settings.setValue(SETTINGS_KEY_EXCLUDEDPATHS, excludedPaths); | ||||||
| 	settings.setValue(SETTINGS_KEY_MOUNTPATHS, mountPaths); | 	settings.setValue(SETTINGS_KEY_MOUNTPATHS, mountPaths); | ||||||
| 	settings.setValue(SETTINGS_KEY_PREVIEWSPERPAGE, ui->spinSettingNumerPerPages->value()); | 	settings.setValue(SETTINGS_KEY_PREVIEWSPERPAGE, ui->spinSettingNumerPerPages->value()); | ||||||
|  | 	settings.setValue(SETTINGS_KEY_DBPATH, databasePath); | ||||||
|  |  | ||||||
| 	settings.sync(); | 	settings.sync(); | ||||||
|  |  | ||||||
| @@ -544,7 +548,7 @@ void MainWindow::makePreviews(int page) | |||||||
| 	scaleText.chop(1); | 	scaleText.chop(1); | ||||||
|  |  | ||||||
| 	QVector<QString> wordsToHighlight; | 	QVector<QString> wordsToHighlight; | ||||||
| 	QRegularExpression extractor(R"#("([^"]*)"|(\p{L}+))#"); | 	QRegularExpression extractor(R"#("([^"]*)"|((\p{L}|\p{N})+))#"); | ||||||
| 	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) | ||||||
|   | |||||||
| @@ -406,6 +406,25 @@ | |||||||
|           </layout> |           </layout> | ||||||
|          </widget> |          </widget> | ||||||
|         </item> |         </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> |         <item> | ||||||
|          <widget class="QGroupBox" name="Misc"> |          <widget class="QGroupBox" name="Misc"> | ||||||
|           <property name="title"> |           <property name="title"> | ||||||
|   | |||||||
| @@ -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},])+)|(?<boolean>AND|OR)" | 		"((?<filtername>(\\.|\\w)+):(?<args>\\((?<innerargs>[^\\)]+)\\)|([\\p{L}\\p{N},])+)|(?<boolean>AND|OR)" | ||||||
| 		"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>[\"\\p{L}]+))"); | 		"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>[\"\\p{L}\\p{N}]+))"); | ||||||
| 	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); }; | ||||||
|   | |||||||
		Αναφορά σε νέο ζήτημα
	
	Block a user