summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-07-08 22:41:01 (GMT)
committerBill King <bill.king@nokia.com>2009-07-08 22:41:01 (GMT)
commit7b980974b14d246f60d824bab4e069ac8cc2da29 (patch)
tree68f0d1667760a0e7e27d57fc76c0434dc028502c /tools
parentcfacb284593008094136905a2497843a4bbac639 (diff)
parent48f049d6fbddd60d99fb6ebc15fd5b52a3b515ec (diff)
downloadQt-7b980974b14d246f60d824bab4e069ac8cc2da29.zip
Qt-7b980974b14d246f60d824bab4e069ac8cc2da29.tar.gz
Qt-7b980974b14d246f60d824bab4e069ac8cc2da29.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/sql/drivers/ibase/qsql_ibase.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qsqldatabase/tst_databases.h tests/auto/qsqldatabase/tst_qsqldatabase.cpp translations/qt_ru.ts
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp29
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp22
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h7
-rw-r--r--tools/configure/configureapp.cpp2
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp5
-rw-r--r--tools/linguist/lupdate/main.cpp5
-rw-r--r--tools/linguist/phrasebooks/russian.qph52
-rw-r--r--tools/qtconfig/translations/translations.pro1
-rw-r--r--tools/qvfb/translations/translations.pro1
9 files changed, 77 insertions, 47 deletions
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 9faafe0..2a41d04 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -84,18 +84,17 @@ private:
, resultWidget(0)
, helpEngine(helpEngine)
{
- hitList.clear();
indexReader = 0;
indexWriter = 0;
}
~QHelpSearchEnginePrivate()
{
- hitList.clear();
delete indexReader;
delete indexWriter;
}
+
int hitsCount() const
{
int count = 0;
@@ -107,12 +106,9 @@ private:
QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const
{
- QList<QHelpSearchEngine::SearchHit> returnValue;
- if (indexReader) {
- for (int i = start; i < end && i < hitsCount(); ++i)
- returnValue.append(indexReader->hit(i));
- }
- return returnValue;
+ return indexReader ?
+ indexReader->hits(start, end) :
+ QList<QHelpSearchEngine::SearchHit>();
}
void updateIndex(bool reindex = false)
@@ -131,11 +127,9 @@ private:
connect(indexWriter, SIGNAL(indexingFinished()), this, SLOT(optimizeIndex()));
}
- if (indexWriter) {
- indexWriter->cancelIndexing();
- indexWriter->updateIndex(helpEngine->collectionFile(),
- indexFilesFolder(), reindex);
- }
+ indexWriter->cancelIndexing();
+ indexWriter->updateIndex(helpEngine->collectionFile(),
+ indexFilesFolder(), reindex);
}
void cancelIndexing()
@@ -159,11 +153,9 @@ private:
connect(indexReader, SIGNAL(searchingFinished(int)), this, SIGNAL(searchingFinished(int)));
}
- if (indexReader) {
- m_queryList = queryList;
- indexReader->cancelSearching();
- indexReader->search(helpEngine->collectionFile(), indexFilesFolder(), queryList);
- }
+ m_queryList = queryList;
+ indexReader->cancelSearching();
+ indexReader->search(helpEngine->collectionFile(), indexFilesFolder(), queryList);
}
void cancelSearching()
@@ -204,7 +196,6 @@ private:
QHelpSearchIndexWriter *indexWriter;
QPointer<QHelpEngineCore> helpEngine;
- QList<QHelpSearchEngine::SearchHit> hitList;
QList<QHelpSearchQuery> m_queryList;
};
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index 227e558..89d6040 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -70,7 +70,6 @@ QHelpSearchIndexReader::~QHelpSearchIndexReader()
{
mutex.lock();
this->m_cancel = true;
- waitCondition.wakeOne();
mutex.unlock();
wait();
@@ -86,8 +85,8 @@ void QHelpSearchIndexReader::cancelSearching()
void QHelpSearchIndexReader::search(const QString &collectionFile, const QString &indexFilesFolder,
const QList<QHelpSearchQuery> &queryList)
{
- QMutexLocker lock(&mutex);
-
+ wait();
+
this->hitList.clear();
this->m_cancel = false;
this->m_query = queryList;
@@ -99,12 +98,18 @@ void QHelpSearchIndexReader::search(const QString &collectionFile, const QString
int QHelpSearchIndexReader::hitsCount() const
{
+ QMutexLocker lock(&mutex);
return hitList.count();
}
-QHelpSearchEngine::SearchHit QHelpSearchIndexReader::hit(int index) const
+QList<QHelpSearchEngine::SearchHit> QHelpSearchIndexReader::hits(int start,
+ int end) const
{
- return hitList.at(index);
+ QList<QHelpSearchEngine::SearchHit> hits;
+ QMutexLocker lock(&mutex);
+ for (int i = start; i < end && i < hitList.count(); ++i)
+ hits.append(hitList.at(i));
+ return hits;
}
void QHelpSearchIndexReader::run()
@@ -135,7 +140,7 @@ void QHelpSearchIndexReader::run()
if(QCLuceneIndexReader::indexExists(indexPath)) {
mutex.lock();
if (m_cancel) {
- mutex.unlock();
+ mutex.unlock();
return;
}
mutex.unlock();
@@ -213,7 +218,9 @@ void QHelpSearchIndexReader::run()
#if !defined(QT_NO_EXCEPTIONS)
} catch(...) {
+ mutex.lock();
hitList.clear();
+ mutex.unlock();
emit searchingFinished(0);
}
#endif
@@ -416,8 +423,9 @@ void QHelpSearchIndexReader::boostSearchHits(const QHelpEngineCore &engine,
boostedList.append(it.value());
} while (it != hitMap.constBegin());
boostedList += hitList.mid(count, hitList.count());
-
+ mutex.lock();
hitList = boostedList;
+ mutex.unlock();
}
}
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
index 47af43f..8876d80 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
@@ -85,9 +85,8 @@ public:
void search(const QString &collectionFile,
const QString &indexFilesFolder,
const QList<QHelpSearchQuery> &queryList);
-
int hitsCount() const;
- QHelpSearchEngine::SearchHit hit(int index) const;
+ QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const;
signals:
void searchingStarted();
@@ -105,10 +104,8 @@ private:
const QList<QHelpSearchQuery> &queryList);
private:
- QMutex mutex;
+ mutable QMutex mutex;
QList<QHelpSearchEngine::SearchHit> hitList;
- QWaitCondition waitCondition;
-
bool m_cancel;
QString m_collectionFile;
QList<QHelpSearchQuery> m_query;
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 509444b..ce9fe6b 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1521,7 +1521,7 @@ bool Configure::displayHelp()
desc( "-graphicssystem <sys>", "Specify which graphicssystem should be used.\n"
"Available values for <sys>:");
desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' ');
- desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL accelleration, experimental!", ' ');
+ desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' ');
desc( "-help, -h, -?", "Display this information.\n");
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp
index f21da8c..04cd105 100644
--- a/tools/designer/src/designer/qdesigner_workbench.cpp
+++ b/tools/designer/src/designer/qdesigner_workbench.cpp
@@ -462,8 +462,7 @@ void QDesignerWorkbench::switchToTopLevelMode()
// make sure that the widgetbox is visible if it is different from neutral.
QDesignerToolWindow *widgetBoxWrapper = widgetBoxToolWindow();
Q_ASSERT(widgetBoxWrapper);
- if (!widgetBoxWrapper->action()->isChecked())
- widgetBoxWrapper->action()->trigger();
+ const bool needWidgetBoxWrapperVisible = widgetBoxWrapper->action()->isChecked();
switchToNeutralMode();
const QPoint desktopOffset = desktopGeometry().topLeft();
@@ -502,7 +501,7 @@ void QDesignerWorkbench::switchToTopLevelMode()
found_visible_window |= tw->isVisible();
}
- if (!widgetBoxWrapper->action()->isChecked())
+ if (needWidgetBoxWrapperVisible)
widgetBoxWrapper->action()->trigger();
if (!m_toolWindows.isEmpty() && !found_visible_window)
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index c9250c6..a531af8 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -182,9 +182,10 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
if (options & Verbose)
printOut(QObject::tr("Updating '%1'...\n").arg(fn));
+ UpdateOptions theseOptions = options;
if (tor.locationsType() == Translator::NoLocations) // Could be set from file
- options |= NoLocations;
- Translator out = merge(tor, fetchedTor, options, err);
+ theseOptions |= NoLocations;
+ Translator out = merge(tor, fetchedTor, theseOptions, err);
if (!codecForTr.isEmpty())
out.setCodecName(codecForTr);
diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph
index 629c60b..69af041 100644
--- a/tools/linguist/phrasebooks/russian.qph
+++ b/tools/linguist/phrasebooks/russian.qph
@@ -10,7 +10,7 @@
</phrase>
<phrase>
<source>accessibility</source>
- <target>удобство</target>
+ <target>специальные возможности</target>
</phrase>
<phrase>
<source>action handle</source>
@@ -345,8 +345,8 @@
<target>активная зона</target>
</phrase>
<phrase>
- <source>icon</source>
- <target>пиктограмма</target>
+ <source>Icon</source>
+ <target>Значок</target>
</phrase>
<phrase>
<source>inactive</source>
@@ -402,7 +402,7 @@
</phrase>
<phrase>
<source>list view</source>
- <target>древовидный список</target>
+ <target>список</target>
</phrase>
<phrase>
<source>manual link</source>
@@ -901,10 +901,6 @@
<target>панель инструментов</target>
</phrase>
<phrase>
- <source>tooltip</source>
- <target>всплывающая подсказка</target>
-</phrase>
-<phrase>
<source>tree view control</source>
<target>древовидный список</target>
</phrase>
@@ -1054,10 +1050,46 @@
</phrase>
<phrase>
<source>Case Sensitive</source>
- <target>Регистрозависимо</target>
+ <target>Учитывать регистр</target>
</phrase>
<phrase>
<source>Whole words</source>
- <target>Слова полностью</target>
+ <target>Слова целиком</target>
+</phrase>
+<phrase>
+ <source>Find Next</source>
+ <target>Найти следующее</target>
+</phrase>
+<phrase>
+ <source>Find Previous</source>
+ <target>Найти предыдущее</target>
+</phrase>
+<phrase>
+ <source>Case Sensitive</source>
+ <target>Учитывать регистр символов</target>
+</phrase>
+<phrase>
+ <source>Whole words only</source>
+ <target>Только слова целиком</target>
+</phrase>
+<phrase>
+ <source>Subwindow</source>
+ <target>Дочернее окно</target>
+</phrase>
+<phrase>
+ <source>Next</source>
+ <target>Далее</target>
+</phrase>
+<phrase>
+ <source>tree view</source>
+ <target>древовидный список</target>
+</phrase>
+<phrase>
+ <source>ToolTip</source>
+ <target>Подсказка</target>
+</phrase>
+<phrase>
+ <source>Checkable</source>
+ <target>Переключаемое</target>
</phrase>
</QPH>
diff --git a/tools/qtconfig/translations/translations.pro b/tools/qtconfig/translations/translations.pro
index fbbdb2bba2..1f9f572 100644
--- a/tools/qtconfig/translations/translations.pro
+++ b/tools/qtconfig/translations/translations.pro
@@ -8,6 +8,7 @@ HEADERS += ../colorbutton.h ../previewframe.h ../previewwidget.h ../mainw
FORMS = ../mainwindowbase.ui ../paletteeditoradvancedbase.ui ../previewwidgetbase.ui
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qtconfig_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/qtconfig_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/qtconfig_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/qtconfig_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/qtconfig_zh_TW.ts
diff --git a/tools/qvfb/translations/translations.pro b/tools/qvfb/translations/translations.pro
index 736a72c..f667bb8 100644
--- a/tools/qvfb/translations/translations.pro
+++ b/tools/qvfb/translations/translations.pro
@@ -27,6 +27,7 @@ SOURCES = ../qvfb.cpp \
../../shared/deviceskin/deviceskin.cpp
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qvfb_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/qvfb_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/qvfb_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/qvfb_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/qvfb_zh_TW.ts