Déan comparáid idir tiomáintí
	
		
			7 Tiomáintí
		
	
	
		
			b4320f611b
			...
			20a1f8b2cd
		
	
	| Údar | SHA1 | Dáta | |
|---|---|---|---|
| 20a1f8b2cd | |||
| a47af257f3 | |||
| 9686ef30c7 | |||
| abce4cfcd9 | |||
| d55187a71c | |||
| 9e1bc98f38 | |||
| 496aefaa09 | 
| @@ -1,5 +1,11 @@ | |||||||
| # looqs: Release notes | # looqs: Release notes | ||||||
|  |  | ||||||
|  | ## 2022-11-19 - v0.8.1 | ||||||
|  |  | ||||||
|  | CHANGES: | ||||||
|  |  - Fix regression causing previews in second (and higher) result page to not render | ||||||
|  |  - Minor improvements | ||||||
|  |  | ||||||
| ## 2022-10-22 - v0.8 | ## 2022-10-22 - v0.8 | ||||||
|  |  | ||||||
| CHANGES: | CHANGES: | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ There is no need to write the long form of filters. There are also booleans avai | |||||||
| The screenshots in this section may occasionally be slightly outdated, but they are usually recent enough to get an overall impression of the current state of the GUI. | The screenshots in this section may occasionally be slightly outdated, but they are usually recent enough to get an overall impression of the current state of the GUI. | ||||||
|  |  | ||||||
| ## Current status | ## Current status | ||||||
| Latest version: 2022-10-22, v0.8 | Latest version: 2022-11-19, v0.8.1 | ||||||
|  |  | ||||||
| Please keep in mind: looqs is still at an early stage and may exhibit some weirdness and contain bugs. | Please keep in mind: looqs is still at an early stage and may exhibit some weirdness and contain bugs. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -940,12 +940,12 @@ void MainWindow::makePreviews(int page) | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	int end = previewsPerPage; | 	int length = previewsPerPage; | ||||||
| 	int begin = page * previewsPerPage - previewsPerPage; | 	int beginOffset = page * previewsPerPage - previewsPerPage; | ||||||
| 	if(begin < 0) | 	if(beginOffset < 0) | ||||||
| 	{ | 	{ | ||||||
| 		// Should not happen actually | 		// Should not happen actually | ||||||
| 		begin = 0; | 		beginOffset = 0; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	int currentScale = currentSelectedScale(); | 	int currentScale = currentSelectedScale(); | ||||||
| @@ -972,11 +972,14 @@ void MainWindow::makePreviews(int page) | |||||||
| 		renderTarget.path = sr.fileData.absPath; | 		renderTarget.path = sr.fileData.absPath; | ||||||
| 		renderTarget.page = (int)sr.page; | 		renderTarget.page = (int)sr.page; | ||||||
| 		targets.append(renderTarget); | 		targets.append(renderTarget); | ||||||
| 		this->previewOrder[renderTarget.path + QString::number(renderTarget.page)] = previewPos++; |  | ||||||
|  | 		int pos = previewPos - beginOffset; | ||||||
|  | 		this->previewOrder[renderTarget.path + QString::number(renderTarget.page)] = pos; | ||||||
|  | 		++previewPos; | ||||||
| 	} | 	} | ||||||
| 	int numpages = ceil(static_cast<double>(targets.size()) / previewsPerPage); | 	int numpages = ceil(static_cast<double>(targets.size()) / previewsPerPage); | ||||||
| 	ui->spinPreviewPage->setMaximum(numpages); | 	ui->spinPreviewPage->setMaximum(numpages); | ||||||
| 	targets = targets.mid(begin, end); | 	targets = targets.mid(beginOffset, length); | ||||||
|  |  | ||||||
| 	ui->lblTotalPreviewPagesCount->setText(QString::number(numpages)); | 	ui->lblTotalPreviewPagesCount->setText(QString::number(numpages)); | ||||||
| 	ui->previewProcessBar->setMaximum(targets.count()); | 	ui->previewProcessBar->setMaximum(targets.count()); | ||||||
|   | |||||||
| @@ -44,9 +44,9 @@ class MainWindow : public QMainWindow | |||||||
| 	QHash<QString, int> previewOrder; /* Quick lookup for the order a preview should have */ | 	QHash<QString, int> previewOrder; /* Quick lookup for the order a preview should have */ | ||||||
| 	QMap<int, QWidget *> | 	QMap<int, QWidget *> | ||||||
| 		previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */; | 		previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */; | ||||||
| 	bool previewDirty; | 	bool previewDirty = false; | ||||||
| 	int previewsPerPage; | 	int previewsPerPage = 20; | ||||||
| 	unsigned int processedPdfPreviews; | 	unsigned int processedPdfPreviews = 0; | ||||||
| 	unsigned int currentPreviewGeneration = 1; | 	unsigned int currentPreviewGeneration = 1; | ||||||
|  |  | ||||||
| 	void connectSignals(); | 	void connectSignals(); | ||||||
|   | |||||||
| @@ -103,7 +103,7 @@ QString PreviewGeneratorPlainText::generateLineBasedPreviewText(QTextStream &in, | |||||||
| 		int foundWordsCount = 0; | 		int foundWordsCount = 0; | ||||||
| 		for(QString &word : config.wordsToHighlight) | 		for(QString &word : config.wordsToHighlight) | ||||||
| 		{ | 		{ | ||||||
| 			QRegularExpression searchRegex("\\b" + word + "\\b"); | 			QRegularExpression searchRegex("\\b" + QRegularExpression::escape(word) + "\\b"); | ||||||
| 			bool containsRegex = line.contains(searchRegex); | 			bool containsRegex = line.contains(searchRegex); | ||||||
| 			bool contains = false; | 			bool contains = false; | ||||||
| 			if(!containsRegex) | 			if(!containsRegex) | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ QByteArray PreviewResultPdf::serialize() const | |||||||
|  |  | ||||||
| QSharedPointer<PreviewResultPdf> PreviewResultPdf::deserialize(QByteArray &ba) | QSharedPointer<PreviewResultPdf> PreviewResultPdf::deserialize(QByteArray &ba) | ||||||
| { | { | ||||||
| 	PreviewResultPdf *result = new PreviewResultPdf(); | 	QSharedPointer<PreviewResultPdf> result(new PreviewResultPdf()); | ||||||
| 	PreviewResultType type; | 	PreviewResultType type; | ||||||
|  |  | ||||||
| 	QDataStream stream{&ba, QIODevice::ReadOnly}; | 	QDataStream stream{&ba, QIODevice::ReadOnly}; | ||||||
| @@ -40,5 +40,5 @@ QSharedPointer<PreviewResultPdf> PreviewResultPdf::deserialize(QByteArray &ba) | |||||||
| 		throw std::runtime_error("Invalid byte array: Not a pdf preview"); | 		throw std::runtime_error("Invalid byte array: Not a pdf preview"); | ||||||
| 	} | 	} | ||||||
| 	stream >> result->documentPath >> result->page >> result->previewImage; | 	stream >> result->documentPath >> result->page >> result->previewImage; | ||||||
| 	return QSharedPointer<PreviewResultPdf>(result); | 	return result; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -40,7 +40,8 @@ QByteArray PreviewResultPlainText::serialize() const | |||||||
|  |  | ||||||
| QSharedPointer<PreviewResultPlainText> PreviewResultPlainText::deserialize(QByteArray &ba) | QSharedPointer<PreviewResultPlainText> PreviewResultPlainText::deserialize(QByteArray &ba) | ||||||
| { | { | ||||||
| 	PreviewResultPlainText *result = new PreviewResultPlainText(); | 	QSharedPointer<PreviewResultPlainText> result(new PreviewResultPlainText()); | ||||||
|  |  | ||||||
| 	PreviewResultType type; | 	PreviewResultType type; | ||||||
|  |  | ||||||
| 	QDataStream stream{&ba, QIODevice::ReadOnly}; | 	QDataStream stream{&ba, QIODevice::ReadOnly}; | ||||||
| @@ -50,5 +51,5 @@ QSharedPointer<PreviewResultPlainText> PreviewResultPlainText::deserialize(QByte | |||||||
| 		throw std::runtime_error("Invalid byte array: Not a pdf preview"); | 		throw std::runtime_error("Invalid byte array: Not a pdf preview"); | ||||||
| 	} | 	} | ||||||
| 	stream >> result->documentPath >> result->page >> result->text; | 	stream >> result->documentPath >> result->page >> result->text; | ||||||
| 	return QSharedPointer<PreviewResultPlainText>(result); | 	return result; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -157,7 +157,6 @@ QSqlQuery SqliteSearch::makeSqlQuery(const LooqsQuery &query) | |||||||
| 		throw LooqsGeneralException("Nothing to search for supplied"); | 		throw LooqsGeneralException("Nothing to search for supplied"); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	bool ftsAlreadyJoined = false; |  | ||||||
| 	auto tokens = query.getTokens(); | 	auto tokens = query.getTokens(); | ||||||
| 	for(const Token &token : tokens) | 	for(const Token &token : tokens) | ||||||
| 	{ | 	{ | ||||||
|   | |||||||
 Nuashonraíodh fomhodúl submodules/exile.h: e711a1d53a...769f729dc5
									
								
							
		Tagairt in Eagrán Nua
	
	Cuir bac ar úsáideoir