aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/logview
diff options
context:
space:
mode:
authorGravatar Fabio Bas2008-08-07 16:34:25 +0000
committerGravatar Fabio Bas2008-08-07 16:34:25 +0000
commitd228b95a041f4c74ddb20cdec240542756c2db19 (patch)
treeae70167a44ba917a282f1e00aba388a44ab55a16 /src/modules/logview
parentCompilation fixes by KByte. Also added SolidIRC network to the default server... (diff)
downloadKVIrc-d228b95a041f4c74ddb20cdec240542756c2db19.tar.gz
KVIrc-d228b95a041f4c74ddb20cdec240542756c2db19.tar.bz2
KVIrc-d228b95a041f4c74ddb20cdec240542756c2db19.zip
fix for reopened #34
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2207 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/logview')
-rw-r--r--src/modules/logview/logviewmdiwindow.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/logview/logviewmdiwindow.cpp b/src/modules/logview/logviewmdiwindow.cpp
index c7a93aa3e..78f822d4e 100644
--- a/src/modules/logview/logviewmdiwindow.cpp
+++ b/src/modules/logview/logviewmdiwindow.cpp
@@ -383,10 +383,17 @@ void KviLogViewMDIWindow::deleteCurrent()
KviLogFile::KviLogFile(const QString& name)
{
+ QString szTmpName=name;
m_szFilename=name;
+
QFileInfo fi(m_szFilename);
m_bCompressed=(fi.extension(false)=="gz");
- QString typeToken = m_szFilename.section('_',0,0);
+ if(m_bCompressed)
+ {
+ //removes trailing dot and extension
+ szTmpName.chop(3);
+ }
+ QString typeToken = szTmpName.section('_',0,0);
// Ignore non-logs files, this includes '.' and '..'
if( KviQString::equalCI(typeToken,"channel") )
m_type = Channel;
@@ -399,14 +406,14 @@ KviLogFile::KviLogFile(const QString& name)
else
m_type = Other;
- KviStr undecoded = m_szFilename.section('.',0,0);
+ KviStr undecoded = szTmpName.section('.',0,0);
undecoded.cutToFirst('_');
m_szName = undecoded.hexDecode(undecoded.ptr()).ptr();
- undecoded = m_szFilename.section('.',1).section('_',0,0);
+ undecoded = szTmpName.section('.',1).section('_',0,0);
m_szNetwork = undecoded.hexDecode(undecoded.ptr()).ptr();
- QString szDate = m_szFilename.section('.',-4,-1).section('_',1,1);
+ QString szDate = szTmpName.section('.',-4,-1).section('_',1,1);
int iYear = szDate.section('.',0,0).toInt();
int iMonth = szDate.section('.',1,1).toInt();
int iDay = szDate.section('.',2,2).toInt();