aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/help
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/help')
-rw-r--r--src/modules/help/helpwidget.cpp4
-rw-r--r--src/modules/help/helpwindow.cpp2
-rw-r--r--src/modules/help/index.cpp28
-rw-r--r--src/modules/help/libkvihelp.cpp4
4 files changed, 19 insertions, 19 deletions
diff --git a/src/modules/help/helpwidget.cpp b/src/modules/help/helpwidget.cpp
index df4badcd3..cd7707913 100644
--- a/src/modules/help/helpwidget.cpp
+++ b/src/modules/help/helpwidget.cpp
@@ -44,7 +44,7 @@ extern Index * g_pDocIndex;
extern KviPointerList<KviHelpWindow> * g_pHelpWindowList;
extern KviPointerList<KviHelpWidget> * g_pHelpWidgetList;
-KviHelpWidget::KviHelpWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone)
+KviHelpWidget::KviHelpWidget(QWidget * par,KviFrame *,bool bIsStandalone)
: QWidget(par)
{
setObjectName("help_widget");
@@ -103,7 +103,7 @@ void KviHelpWidget::showIndex()
m_pTextBrowser->setSource(QUrl::fromLocalFile(dirHelp.absoluteFilePath("index.html")));
}
-void KviHelpWidget::resizeEvent(QResizeEvent *e)
+void KviHelpWidget::resizeEvent(QResizeEvent *)
{
int hght = m_pToolBar->sizeHint().height();
if(hght < 40)hght = 40;
diff --git a/src/modules/help/helpwindow.cpp b/src/modules/help/helpwindow.cpp
index 33ac9f351..397967deb 100644
--- a/src/modules/help/helpwindow.cpp
+++ b/src/modules/help/helpwindow.cpp
@@ -271,7 +271,7 @@ QPixmap * KviHelpWindow::myIconPtr()
return g_pIconManager->getSmallIcon(KVI_SMALLICON_MDIHELP);
}
-void KviHelpWindow::resizeEvent(QResizeEvent *e)
+void KviHelpWindow::resizeEvent(QResizeEvent *)
{
m_pSplitter->setGeometry(0,0,width(),height());
}
diff --git a/src/modules/help/index.cpp b/src/modules/help/index.cpp
index 3a7664b83..a311f42dd 100644
--- a/src/modules/help/index.cpp
+++ b/src/modules/help/index.cpp
@@ -60,7 +60,7 @@ QDataStream &operator<<( QDataStream &s, const Document &l )
return s;
}
-Index::Index( const QString &dp, const QString &hp )
+Index::Index( const QString &dp, const QString & )
: QObject( 0), dict( 8999 ), docPath( dp )
{
alreadyHaveDocList = FALSE;
@@ -68,7 +68,7 @@ Index::Index( const QString &dp, const QString &hp )
connect(qApp,SIGNAL(lastWindowClosed()),this,SLOT(setLastWinClosed()));
}
-Index::Index( const QStringList &dl, const QString &hp )
+Index::Index( const QStringList &dl, const QString & )
: QObject( 0), dict( 8999 )
{
docList = dl;
@@ -99,17 +99,17 @@ int Index::makeIndex()
dict.clear();
QStringList::Iterator it = docList.begin();
-// QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0, docList.count() );
-// pProgressDialog->setWindowTitle(__tr2qs("KVIrc"));
-// pProgressDialog->setMinimumDuration(500);
-// pProgressDialog->setWindowModality(Qt::WindowModal);
+ QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0, docList.count() );
+ pProgressDialog->setWindowTitle(__tr2qs("KVIrc"));
+ pProgressDialog->setMinimumDuration(500);
+ pProgressDialog->setWindowModality(Qt::WindowModal);
for ( int i = 0; it != docList.end(); ++it, ++i ) {
-// if (lastWindowClosed ||pProgressDialog->wasCanceled())
-// break;
+ if (lastWindowClosed ||pProgressDialog->wasCanceled())
+ break;
parseDocument( *it, i );
-// pProgressDialog->setValue(i);
+ pProgressDialog->setValue(i);
}
-// delete pProgressDialog;
+ delete pProgressDialog;
return 0;
}
@@ -162,7 +162,7 @@ void Index::parseDocument( const QString &filename, int docNum )
QChar c = buf[0];
int j = 0;
int i = 0;
- while ( (uint)j < text.length() ) {
+ while ( j < text.length() ) {
if ( c == '<' || c == '&' ) {
valid = FALSE;
if ( i > 1 ) insertInDict( QString(str,i), docNum );
@@ -497,7 +497,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo
QChar c = buf[0];
int j = 0;
int i = 0;
- while ( (uint)j < text.length() ) {
+ while ( j < text.length() ) {
if ( c == '<' || c == '&' ) {
valid = FALSE;
if ( i > 1 ) buildMiniDict( QString(str,i) );
@@ -543,12 +543,12 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo
wordLst = tmp.split( ' ');
a = miniDict[ wordLst[0] ]->positions;
- for ( int j = 1; j < (int)wordLst.count(); ++j ) {
+ for ( int j = 1; j < wordLst.count(); ++j ) {
b = miniDict[ wordLst[j] ]->positions;
aIt = a.begin();
while ( aIt != a.end() ) {
- if ( b.indexOf( *aIt + 1 ) != b.at(b.count()-1) ) {
+ if ( (uint) b.indexOf( *aIt + 1 ) != b.at(b.count()-1) ) {
(*aIt)++;
++aIt;
} else {
diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp
index 556eb96f1..266fe2f9c 100644
--- a/src/modules/help/libkvihelp.cpp
+++ b/src/modules/help/libkvihelp.cpp
@@ -198,7 +198,7 @@ static bool help_module_init(KviModule * m)
return true;
}
-static bool help_module_cleanup(KviModule *m)
+static bool help_module_cleanup(KviModule *)
{
if(g_pDocIndex) delete g_pDocIndex;
while(g_pHelpWidgetList->first())delete g_pHelpWidgetList->first();
@@ -210,7 +210,7 @@ static bool help_module_cleanup(KviModule *m)
return true;
}
-static bool help_module_can_unload(KviModule *m)
+static bool help_module_can_unload(KviModule *)
{
return (g_pHelpWidgetList->isEmpty() && g_pHelpWindowList->isEmpty());
}