diff --git a/libsearch/index/construct-document.cpp b/libsearch/index/construct-document.cpp index 445bdb5..1b1f4eb 100644 --- a/libsearch/index/construct-document.cpp +++ b/libsearch/index/construct-document.cpp @@ -54,12 +54,12 @@ void ConstructDocumentForPath::run() { // } QString uniqueterm = QString::fromStdString(FileUtils::makeDocUterm(sourcePath)); - QString upTerm = QString::fromStdString(FileUtils::makeDocUterm(sourcePath.section("/", 0, -2, QString::SectionIncludeLeadingSep))); + QString upTerm = QString::fromStdString("ZEEKERUPTERM" + FileUtils::makeDocUterm(sourcePath.section("/", 0, -2, QString::SectionIncludeLeadingSep))); // qDebug()<<"sourcePath"<isEmpty()) return true; try { + qDebug() << "--delete start--"; for(int i = 0; i < list->size(); i++) { QString doc = list->at(i); std::string uniqueterm = FileUtils::makeDocUterm(doc); - qDebug() << "--delete start--"; + std::string upterm = "ZEEKERUPTERM" + FileUtils::makeDocUterm(doc); + m_database_path->delete_document(uniqueterm); m_database_content->delete_document(uniqueterm); + + //delete all files under it if it's a dir. + m_database_path->delete_document(upterm); + m_database_content->delete_document(upterm); qDebug() << "delete path" << doc; - qDebug() << "delete md5" << QString::fromStdString(uniqueterm); - qDebug() << "--delete finish--"; +// qDebug() << "delete md5" << QString::fromStdString(uniqueterm); + // qDebug()<<"m_database_path->get_lastdocid()!!!"<get_lastdocid(); // qDebug()<<"m_database_path->get_doccount()!!!"<get_doccount(); } m_database_path->commit(); m_database_content->commit(); + qDebug() << "--delete finish--"; } catch(const Xapian::Error &e) { qWarning() << QString::fromStdString(e.get_description()); return false; diff --git a/libsearch/parser/binary-parser.cpp b/libsearch/parser/binary-parser.cpp index 59e9ef4..040a2cb 100644 --- a/libsearch/parser/binary-parser.cpp +++ b/libsearch/parser/binary-parser.cpp @@ -4874,6 +4874,7 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS, const ULONG *aulBlockDepot; ULONG ulTextOffset, ulBeginTextInfo; ULONG ulTotLength, ulLen; + ULONG ulEncryptInfo; long lIndex, lPieces, lOff; size_t tTextInfoLen, tBlockDepotLen, tBlockSize; int iType, iLen; @@ -4882,6 +4883,11 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS, ulBeginTextInfo = ulGetLong(0x1a2, aucHeader); /* fcClx */ tTextInfoLen = (size_t)ulGetLong(0x1a6, aucHeader); /* lcbClx */ + ulEncryptInfo = ulGetLong(0x0a, aucHeader); + if(ulEncryptInfo & 0x0100) { + qDebug() << "Encrypt file:" << m_strFileName << (size_t)ulEncryptInfo; + return false; + } if(pPPS->tTable.ulSize == 0) return false; diff --git a/src/content-widget.cpp b/src/content-widget.cpp index 0fdcee8..8d04eef 100644 --- a/src/content-widget.cpp +++ b/src/content-widget.cpp @@ -39,7 +39,7 @@ ContentWidget::ContentWidget(QWidget * parent): QStackedWidget(parent) { m_quicklyOpenList.replace(2, "/usr/share/applications/eom.desktop"); } if (QString::compare(FileUtils::getAppName(m_quicklyOpenList.at(4)), "Unknown App") == 0) { - m_quicklyOpenList.replace(4, "/usr/share/applications/org.gnome.Evolution.desktop"); + m_quicklyOpenList.replace(4, "/usr/share/applications/evolution.desktop"); } } diff --git a/src/input-box.cpp b/src/input-box.cpp index 0b57c19..a81f9ce 100644 --- a/src/input-box.cpp +++ b/src/input-box.cpp @@ -105,20 +105,9 @@ void SearchBarHLayout::initUI() { queryWidLayout->setSpacing(5); m_queryWidget->setLayout(queryWidLayout); - - if (!QIcon::fromTheme("system-search-symbolic").isNull()) { - QPixmap pixmap(QIcon::fromTheme("system-search-symbolic").pixmap(QSize(20, 20))); - m_queryIcon = new QLabel; - m_queryIcon->setFixedSize(pixmap.size()); - m_queryIcon->setPixmap(pixmap); - } else { - QPixmap pixmap(QIcon(":/res/icons/system-search.symbolic.png").pixmap(QSize(20, 20))); - m_queryIcon = new QLabel; - m_queryIcon->setFixedSize(pixmap.size()); - m_queryIcon->setPixmap(pixmap); - } - QPixmap pixmap(QIcon::fromTheme("system-search-symbolic").pixmap(QSize(20, 20))); + QPixmap pixmap(QIcon::fromTheme("system-search-symbolic", QIcon(":/res/icons/system-search.symbolic.png")).pixmap(QSize(20, 20))); m_queryIcon = new QLabel; + m_queryIcon->setProperty("useIconHighlightEffect", 0x10); m_queryIcon->setFixedSize(pixmap.size()); m_queryIcon->setPixmap(pixmap);