Сравнить коммиты
Нет общих коммитов. «20a1f8b2cd2687df95732ff32ebd6a497b48bdae» и «b4320f611b4581eec48014b080e006f838d90c8a» имеют совершенно разные истории.
20a1f8b2cd
...
b4320f611b
@ -1,11 +1,5 @@
|
||||
# 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
|
||||
|
||||
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.
|
||||
|
||||
## Current status
|
||||
Latest version: 2022-11-19, v0.8.1
|
||||
Latest version: 2022-10-22, v0.8
|
||||
|
||||
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 length = previewsPerPage;
|
||||
int beginOffset = page * previewsPerPage - previewsPerPage;
|
||||
if(beginOffset < 0)
|
||||
int end = previewsPerPage;
|
||||
int begin = page * previewsPerPage - previewsPerPage;
|
||||
if(begin < 0)
|
||||
{
|
||||
// Should not happen actually
|
||||
beginOffset = 0;
|
||||
begin = 0;
|
||||
}
|
||||
|
||||
int currentScale = currentSelectedScale();
|
||||
@ -972,14 +972,11 @@ void MainWindow::makePreviews(int page)
|
||||
renderTarget.path = sr.fileData.absPath;
|
||||
renderTarget.page = (int)sr.page;
|
||||
targets.append(renderTarget);
|
||||
|
||||
int pos = previewPos - beginOffset;
|
||||
this->previewOrder[renderTarget.path + QString::number(renderTarget.page)] = pos;
|
||||
++previewPos;
|
||||
this->previewOrder[renderTarget.path + QString::number(renderTarget.page)] = previewPos++;
|
||||
}
|
||||
int numpages = ceil(static_cast<double>(targets.size()) / previewsPerPage);
|
||||
ui->spinPreviewPage->setMaximum(numpages);
|
||||
targets = targets.mid(beginOffset, length);
|
||||
targets = targets.mid(begin, end);
|
||||
|
||||
ui->lblTotalPreviewPagesCount->setText(QString::number(numpages));
|
||||
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 */
|
||||
QMap<int, QWidget *>
|
||||
previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */;
|
||||
bool previewDirty = false;
|
||||
int previewsPerPage = 20;
|
||||
unsigned int processedPdfPreviews = 0;
|
||||
bool previewDirty;
|
||||
int previewsPerPage;
|
||||
unsigned int processedPdfPreviews;
|
||||
unsigned int currentPreviewGeneration = 1;
|
||||
|
||||
void connectSignals();
|
||||
|
@ -103,7 +103,7 @@ QString PreviewGeneratorPlainText::generateLineBasedPreviewText(QTextStream &in,
|
||||
int foundWordsCount = 0;
|
||||
for(QString &word : config.wordsToHighlight)
|
||||
{
|
||||
QRegularExpression searchRegex("\\b" + QRegularExpression::escape(word) + "\\b");
|
||||
QRegularExpression searchRegex("\\b" + word + "\\b");
|
||||
bool containsRegex = line.contains(searchRegex);
|
||||
bool contains = false;
|
||||
if(!containsRegex)
|
||||
|
@ -30,7 +30,7 @@ QByteArray PreviewResultPdf::serialize() const
|
||||
|
||||
QSharedPointer<PreviewResultPdf> PreviewResultPdf::deserialize(QByteArray &ba)
|
||||
{
|
||||
QSharedPointer<PreviewResultPdf> result(new PreviewResultPdf());
|
||||
PreviewResultPdf *result = new PreviewResultPdf();
|
||||
PreviewResultType type;
|
||||
|
||||
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");
|
||||
}
|
||||
stream >> result->documentPath >> result->page >> result->previewImage;
|
||||
return result;
|
||||
return QSharedPointer<PreviewResultPdf>(result);
|
||||
}
|
||||
|
@ -40,8 +40,7 @@ QByteArray PreviewResultPlainText::serialize() const
|
||||
|
||||
QSharedPointer<PreviewResultPlainText> PreviewResultPlainText::deserialize(QByteArray &ba)
|
||||
{
|
||||
QSharedPointer<PreviewResultPlainText> result(new PreviewResultPlainText());
|
||||
|
||||
PreviewResultPlainText *result = new PreviewResultPlainText();
|
||||
PreviewResultType type;
|
||||
|
||||
QDataStream stream{&ba, QIODevice::ReadOnly};
|
||||
@ -51,5 +50,5 @@ QSharedPointer<PreviewResultPlainText> PreviewResultPlainText::deserialize(QByte
|
||||
throw std::runtime_error("Invalid byte array: Not a pdf preview");
|
||||
}
|
||||
stream >> result->documentPath >> result->page >> result->text;
|
||||
return result;
|
||||
return QSharedPointer<PreviewResultPlainText>(result);
|
||||
}
|
||||
|
@ -157,6 +157,7 @@ QSqlQuery SqliteSearch::makeSqlQuery(const LooqsQuery &query)
|
||||
throw LooqsGeneralException("Nothing to search for supplied");
|
||||
}
|
||||
|
||||
bool ftsAlreadyJoined = false;
|
||||
auto tokens = query.getTokens();
|
||||
for(const Token &token : tokens)
|
||||
{
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 769f729dc51f2feb8bc3cbb2a48ed91ff2d56bf3
|
||||
Subproject commit e711a1d53a9210f8f562f774901e5e044d20e67a
|
Загрузка…
Ссылка в новой задаче
Block a user