{
if (m_dbOpened)
return true;
- emit error(tr("The collection file '%1' is not set up yet!").
+ emit error(tr("The collection file '%1' is not set up yet.").
arg(m_collectionFile));
return false;
}
m_connectionName);
if (db.driver()
&& db.driver()->lastError().type() == QSqlError::ConnectionError) {
- emit error(tr("Cannot load sqlite database driver!"));
+ emit error(tr("Cannot load sqlite database driver."));
return false;
}
m_query.next();
if (m_query.value(0).toInt() < 1) {
if (!createTables(&m_query)) {
- emit error(tr("Cannot create tables in file %1!").arg(collectionFile()));
+ emit error(tr("Cannot create tables in file %1.").arg(collectionFile()));
return false;
}
}
QFileInfo fi(fileName);
if (fi.exists()) {
- emit error(tr("The collection file '%1' already exists!").
+ emit error(tr("The collection file '%1' already exists.").
arg(fileName));
return false;
}
filterNameId = m_query.value(0).toInt();
if (filterNameId < 0) {
- emit error(tr("Unknown filter '%1'!").arg(filterName));
+ emit error(tr("Unknown filter '%1'.").arg(filterName));
return false;
}
}
if (nameId < 0) {
- emit error(tr("Cannot register filter %1!").arg(filterName));
+ emit error(tr("Cannot register filter %1.").arg(filterName));
return false;
}
QHelpDBReader reader(fileName, QHelpGlobal::uniquifyConnectionName(
QLatin1String("QHelpCollectionHandler"), this), 0);
if (!reader.init()) {
- emit error(tr("Cannot open documentation file %1!").arg(fileName));
+ emit error(tr("Cannot open documentation file %1.").arg(fileName));
return false;
}
QString ns = reader.namespaceName();
if (ns.isEmpty()) {
- emit error(tr("Invalid documentation file '%1'!").arg(fileName));
+ emit error(tr("Invalid documentation file '%1'.").arg(fileName));
return false;
}
nsId = m_query.value(0).toInt();
if (nsId < 0) {
- emit error(tr("The namespace %1 was not registered!").arg(namespaceName));
+ emit error(tr("The namespace %1 was not registered.").arg(namespaceName));
return false;
}
m_query.exec();
while (m_query.next()) {
if (m_query.value(0).toInt() > 0) {
- emit error(tr("Namespace %1 already exists!").arg(nspace));
+ emit error(tr("Namespace %1 already exists.").arg(nspace));
return -1;
}
}
if (m_query.exec())
namespaceId = m_query.lastInsertId().toInt();
if (namespaceId < 1) {
- emit error(tr("Cannot register namespace '%1'!").arg(nspace));
+ emit error(tr("Cannot register namespace '%1'.").arg(nspace));
return -1;
}
return namespaceId;
db.setDatabaseName(fileName);
if (!db.open()) {
QSqlDatabase::removeDatabase(QLatin1String("optimize"));
- emit error(tr("Cannot open database '%1' to optimize!").arg(fileName));
+ emit error(tr("Cannot open database '%1' to optimize.").arg(fileName));
return;
}
QHelpDBReader *reader = new QHelpDBReader(absFileName,
QHelpGlobal::uniquifyConnectionName(info.fileName, this), this);
if (!reader->init()) {
- emit q->warning(QHelpEngineCore::tr("Cannot open documentation file %1: %2!")
+ emit q->warning(QHelpEngineCore::tr("Cannot open documentation file %1: %2.")
.arg(absFileName, reader->errorMessage()));
continue;
}
return res;
QHelpDBReader *reader = d->readerMap.value(namespaceName);
if (!reader) {
- d->error = tr("The specified namespace does not exist!");
+ d->error = tr("The specified namespace does not exist.");
return res;
}
emit progressChanged(0);
d->error.clear();
if (!helpData || helpData->namespaceName().isEmpty()) {
- d->error = tr("Invalid help data!");
+ d->error = tr("Invalid help data.");
return false;
}
QString outFileName = outputFileName;
if (outFileName.isEmpty()) {
- d->error = tr("No output file name specified!");
+ d->error = tr("No output file name specified.");
return false;
}
QFileInfo fi(outFileName);
if (fi.exists()) {
if (!fi.dir().remove(fi.fileName())) {
- d->error = tr("The file %1 cannot be overwritten!").arg(outFileName);
+ d->error = tr("The file %1 cannot be overwritten.").arg(outFileName);
return false;
}
}
}
if (!openingOk) {
- d->error = tr("Cannot open data base file %1!").arg(outFileName);
+ d->error = tr("Cannot open data base file %1.").arg(outFileName);
cleanupDB();
return false;
}
insertMetaData(helpData->metaData());
if (!registerVirtualFolder(helpData->virtualFolder(), helpData->namespaceName())) {
- d->error = tr("Cannot register namespace %1!").arg(helpData->namespaceName());
+ d->error = tr("Cannot register namespace %1.").arg(helpData->namespaceName());
cleanupDB();
return false;
}
"AND Name=\'NamespaceTable\'"));
d->query->next();
if (d->query->value(0).toInt() > 0) {
- d->error = tr("Some tables already exist!");
+ d->error = tr("Some tables already exist.");
return false;
}
foreach (const QString &q, tables) {
if (!d->query->exec(q)) {
- d->error = tr("Cannot create tables!");
+ d->error = tr("Cannot create tables.");
return false;
}
}
return d->virtualFolderId > 0;
}
}
- d->error = tr("Cannot register virtual folder!");
+ d->error = tr("Cannot register virtual folder.");
return false;
}
if (d->query->exec())
nameId = d->query->lastInsertId().toInt();
} else if (!forceUpdate) {
- d->error = tr("The filter %1 is already registered!").arg(filterName);
+ d->error = tr("The filter %1 is already registered.").arg(filterName);
return false;
}
if (nameId < 0) {
- d->error = tr("Cannot register filter %1!").arg(filterName);
+ d->error = tr("Cannot register filter %1.").arg(filterName);
return false;
}
d->query->exec();
int contentId = d->query->lastInsertId().toInt();
if (contentId < 1) {
- d->error = tr("Cannot insert contents!");
+ d->error = tr("Cannot insert contents.");
return false;
}
d->query->bindValue(1, filterAtt);
d->query->exec();
if (!d->query->isActive()) {
- d->error = tr("Cannot register contents!");
+ d->error = tr("Cannot register contents.");
return false;
}
}
readProject();
else
raiseError(QCoreApplication::translate("QHelpProject",
- "Unknown token. Expected \"QtHelpProject\"!"));
+ "Unknown token. Expected \"QtHelpProject\"."));
}
}
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly)) {
d->errorMsg = QCoreApplication::translate("QHelpProject",
- "The input file %1 could not be opened!").arg(fileName);
+ "The input file %1 could not be opened.").arg(fileName);
return false;
}
"%1 <span style=\"font-weight:normal; color:black\">"
"%2</span></div></div><br>")).arg(tr("Note:"))
.arg(tr("The search results may not be complete since the "
- "documentation is still being indexed!"));
+ "documentation is still being indexed."));
foreach (const QHelpSearchEngine::SearchHit &hit, hits) {
htmlFile += QString(QLatin1String("<div style=\"text-align:left; font-weight:bold\""