diff options
| author | 2010-08-31 09:10:41 +0000 | |
|---|---|---|
| committer | 2010-08-31 09:10:41 +0000 | |
| commit | c8ba5d212c9da7d11f08684c5d244cfaad4d0032 (patch) | |
| tree | ed21d44e601fd369c5830bf7c445879ed3ebc5a0 /src | |
| parent | some fix for OnHighlight doc (diff) | |
| download | KVIrc-c8ba5d212c9da7d11f08684c5d244cfaad4d0032.tar.gz KVIrc-c8ba5d212c9da7d11f08684c5d244cfaad4d0032.tar.bz2 KVIrc-c8ba5d212c9da7d11f08684c5d244cfaad4d0032.zip | |
applied typo fixes for the "file" and "config" modules (thank OmegaPhil)
fixed fsf address in python/pythoncore modules
fixed "space before comma" in documentation/coments/code
regenerated translations
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4954 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
183 files changed, 646 insertions, 646 deletions
diff --git a/src/kvilib/core/kvi_error.cpp b/src/kvilib/core/kvi_error.cpp index 6541778be..dacc6bf7b 100644 --- a/src/kvilib/core/kvi_error.cpp +++ b/src/kvilib/core/kvi_error.cpp @@ -151,7 +151,7 @@ const char * g_errorTable[KVI_NUM_ERRORS]= __tr_no_lookup("Unexpected end in expression"), __tr_no_lookup("Unexpected end in array index"), __tr_no_lookup("Connection thru HTTP proxy failed"), - __tr_no_lookup("Case , match , regexp , default or break keyword expected"), + __tr_no_lookup("Case, match, regexp, default or break keyword expected"), __tr_no_lookup("Access denied"), __tr_no_lookup("Address already in use"), __tr_no_lookup("Can't assign the requested address"), diff --git a/src/kvilib/core/kvi_malloc.cpp b/src/kvilib/core/kvi_malloc.cpp index 1b204ef4e..a554b2ede 100644 --- a/src/kvilib/core/kvi_malloc.cpp +++ b/src/kvilib/core/kvi_malloc.cpp @@ -25,7 +25,7 @@ //============================================================================= // C memory allocation routines // This stuff is rather unused, because in normal compilations -// kvi_malloc , kvi_free and kvi_realloc are macros (see kvi_malloc.h) +// kvi_malloc, kvi_free and kvi_realloc are macros (see kvi_malloc.h) //============================================================================= diff --git a/src/kvilib/core/kvi_memmove.cpp b/src/kvilib/core/kvi_memmove.cpp index 6c72f1542..46ba5844e 100644 --- a/src/kvilib/core/kvi_memmove.cpp +++ b/src/kvilib/core/kvi_memmove.cpp @@ -58,7 +58,7 @@ asm(" decl %edi"); // %edi--; (dst_ptr--); asm(" std"); // set direction flag (decrement esi and edi in movsb) // Optimization : check for non-odd len (1,3,5,7...) - asm(" shr $1,%ecx"); // %ecx >> 1 , shifted bit -> CF + asm(" shr $1,%ecx"); // %ecx >> 1, shifted bit -> CF asm(" jnc move_two_bytes_top_to_bottom_directly"); // if !carry (CF == 0) skip this move // Move the first byte (non-odd) asm(" movsb %ds:(%esi),%es:(%edi)"); // *dst-- = *src-- if DF else *dst++ = *src++ @@ -66,7 +66,7 @@ asm(" decl %esi"); // %esi--; (src_ptr--); asm(" decl %edi"); // %edi--; (dst_ptr--); asm("move_two_bytes_top_to_bottom:"); - asm(" shr $1,%ecx"); // %ecx >> 1 , shifted bit -> CF + asm(" shr $1,%ecx"); // %ecx >> 1, shifted bit -> CF asm(" jnc move_the_rest_top_to_bottom_directly"); // if !carry (CF == 0) skip this move // Move the next two bytes asm(" movsw %ds:(%esi),%es:(%edi)"); // *((word *)dst)-- = *((word)src)-- if DF else *((word *)dst)++ = *((word)src)++ @@ -78,13 +78,13 @@ asm("move_from_bottom_to_top:"); asm(" cld"); // clear direction flag (increment esi and edi in movsb) // Optimization : check for non-odd len (1,3,5,7...) - asm(" shr $1,%ecx"); // %ecx >> 1 , shifted bit -> CF + asm(" shr $1,%ecx"); // %ecx >> 1, shifted bit -> CF asm(" jnc move_two_bytes"); // if !carry (CF == 0) skip this move // Move the first byte (non-odd) asm(" movsb %ds:(%esi),%es:(%edi)"); // *dst-- = *src-- if DF else *dst++ = *src++ - // Optimization : pass 2 , check for %2 and %3 + // Optimization : pass 2, check for %2 and %3 asm("move_two_bytes:"); - asm(" shr $1,%ecx"); // %ecx >> 1 , shifted bit -> CF + asm(" shr $1,%ecx"); // %ecx >> 1, shifted bit -> CF asm(" jnc move_the_rest"); // if !carry (CF == 0) skip this move // Move the next two bytes asm(" movsw %ds:(%esi),%es:(%edi)"); // *((word *)dst)-- = *((word)src)-- if DF else *((word *)dst)++ = *((word)src)++ @@ -117,7 +117,7 @@ asm(" addl %ecx,%edi"); // %edi += %ecx (dst_ptr += len); asm(" std"); // set direction flag (decrement esi and edi in movsb) // start moving - asm(" shr $2,%ecx"); // %ecx >> 2 , last shifted bit -> CF + asm(" shr $2,%ecx"); // %ecx >> 2, last shifted bit -> CF asm(" jnc xmove_the_rest_top_to_bottom_directly"); // if !carry (CF == 0) skip this move // Move the next two bytes asm(" subl $2,%esi"); // %esi-=2; (src_ptr-=2); @@ -134,7 +134,7 @@ asm("xmove_from_bottom_to_top:"); asm(" cld"); // clear direction flag (increment esi and edi in movsb) // move it - asm(" shr $2,%ecx"); // %ecx >> 2 , last shifted bit -> CF + asm(" shr $2,%ecx"); // %ecx >> 2, last shifted bit -> CF asm(" jnc xmove_the_rest"); // if !carry (CF == 0) skip this move // Move the next two bytes asm(" movsw %ds:(%esi),%es:(%edi)"); // *((word *)dst)-- = *((word)src)-- if DF else *((word *)dst)++ = *((word)src)++ diff --git a/src/kvilib/core/kvi_qstring.cpp b/src/kvilib/core/kvi_qstring.cpp index 0035d1e65..57c1c6a5f 100644 --- a/src/kvilib/core/kvi_qstring.cpp +++ b/src/kvilib/core/kvi_qstring.cpp @@ -1030,7 +1030,7 @@ namespace KviQString pSavePos1 = ++pM1; if(!pSavePos1->unicode()) { - //last was a wildcard , matches everything ahead... + //last was a wildcard, matches everything ahead... return true; } //next return state for the second string @@ -1050,7 +1050,7 @@ namespace KviQString pM2++; if((!(pM1->unicode())) && pM2->unicode() && pSavePos1) { - //pM1 finished , but pM2 not yet and we have a savePosition for pM1 (there was a wildcard)... + //pM1 finished, but pM2 not yet and we have a savePosition for pM1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) //back to char after wildcard pM1 = pSavePos1; @@ -1078,14 +1078,14 @@ namespace KviQString //...and again continue; } - // pM1 != pM2 , pM1 != * , pM2 != * + // pM1 != pM2, pM1 != *, pM2 != * if((pM1->unicode() == '?') || (pM2->unicode() == '?')) { pM1++; pM2++; if((!(pM1->unicode())) && pM2->unicode() && pSavePos1) { - //pM1 finished , but pM2 not yet and we have a savePosition for pM1 (there was a wildcard)... + //pM1 finished, but pM2 not yet and we have a savePosition for pM1 (there was a wildcard)... //retry matching the string following the * from the pSavePos2 (one char ahead last time) //back to char after wildcard pM1 = pSavePos1; @@ -1111,7 +1111,7 @@ namespace KviQString } } } - //pM1 surely finished , so for the match , pM2 must be finished too + //pM1 surely finished, so for the match, pM2 must be finished too return (!(pM2->unicode())); } diff --git a/src/kvilib/core/kvi_strasm.h b/src/kvilib/core/kvi_strasm.h index 1374531c8..c5e2de11e 100644 --- a/src/kvilib/core/kvi_strasm.h +++ b/src/kvilib/core/kvi_strasm.h @@ -37,7 +37,7 @@ extern inline bool kvi_strEqualCS(const char * pcStr1, const char * pcStr2) { // An instruction pattern is really useful in this case. // When inlining, GCC can optimize to load esi and edi - // directly with the strings , without pushing and getting it + // directly with the strings, without pushing and getting it // from the stack... register bool bEax; __asm__ __volatile__ ( diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp index bff42ad25..256731bd0 100644 --- a/src/kvilib/core/kvi_string.cpp +++ b/src/kvilib/core/kvi_string.cpp @@ -427,7 +427,7 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) { //Found a wildcard in m1 savePos1 = ++m1; //move to the next char and save the position...this is our jolly - if(!*savePos1)return true; //last was a wildcard , matches everything ahead... + if(!*savePos1)return true; //last was a wildcard, matches everything ahead... savePos2 = m2+1; //next return state for the second string continue; //and return } @@ -439,7 +439,7 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) m2++; // if((!(*m1)) && *m2 && savePos1) { - //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... + //m1 finished, but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) m1 = savePos1; //back to char after wildcard m2 = savePos2; //back to last savePos2 @@ -458,14 +458,14 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) savePos2 = m2 + 1; //sync save pos2 continue; //...and again } - // m1 != m2 , m1 != * , m2 != * + // m1 != m2, m1 != *, m2 != * if((*m1 == '?') || (*m2 == '?')) { m1++; m2++; if((!(*m1)) && *m2 && savePos1) { - //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... + //m1 finished, but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) m1 = savePos1; //back to char after wildcard m2 = savePos2; //back to last savePos2 @@ -482,7 +482,7 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) } } } - return (!(*m2)); //m1 surely finished , so for the match , m2 must be finished too + return (!(*m2)); //m1 surely finished, so for the match, m2 must be finished too } @@ -500,7 +500,7 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2) if(*m1=='*'){ //Found a wildcard in m1 savePos1 = ++m1; //move to the next char and save the position...this is our jolly - if(!*savePos1)return true; //last was a wildcard , matches everything ahead... + if(!*savePos1)return true; //last was a wildcard, matches everything ahead... savePos2 = m2+1; //next return state for the second string continue; //and return } @@ -510,7 +510,7 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2) m1++; //Go ahead in the two strings m2++; // if((!(*m1)) && *m2 && savePos1){ - //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... + //m1 finished, but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) m1 = savePos1; //back to char after wildcard m2 = savePos2; //back to last savePos2 @@ -535,7 +535,7 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2) } else return false; //No previous wildcards...not matched! } } - return (!(*m2)); //m1 surely finished , so for the match , m2 must be finished too + return (!(*m2)); //m1 surely finished, so for the match, m2 must be finished too } */ @@ -560,7 +560,7 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char savePos1 = ++m1; //move to the next char and save the position...this is our jolly if(!NOT_AT_END(savePos1)) { - //last was a wildcard , matches everything ahead... + //last was a wildcard, matches everything ahead... while(NOT_AT_END(m2))m2++; *r1 = bSwapped ? m2 : m1; *r2 = bSwapped ? m1 : m2; @@ -577,7 +577,7 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char m2++; // if((!NOT_AT_END(m1)) && NOT_AT_END(m2) && savePos1) { - //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... + //m1 finished, but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) m1 = savePos1; //back to char after wildcard m2 = savePos2; //back to last savePos2 @@ -597,14 +597,14 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char savePos2 = m2 + 1; //sync save pos2 continue; //...and again } - // m1 != m2 , m1 != * , m2 != * + // m1 != m2, m1 != *, m2 != * if((*m1 == '?') || (*m2 == '?')) { m1++; m2++; if((!NOT_AT_END(m1)) && NOT_AT_END(m2) && savePos1) { - //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... + //m1 finished, but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) m1 = savePos1; //back to char after wildcard m2 = savePos2; //back to last savePos2 @@ -624,7 +624,7 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char *r1 = bSwapped ? m2 : m1; *r2 = bSwapped ? m1 : m2; - return (!NOT_AT_END(m2)); //m1 surely finished , so for the match , m2 must be finished too + return (!NOT_AT_END(m2)); //m1 surely finished, so for the match, m2 must be finished too #undef NOT_AT_END } @@ -1102,9 +1102,9 @@ KviStr::KviStr(KviFormatConstructorTag,const char *fmt,...) //check if we failed if(m_len < 0){ - //yes , failed.... + //yes, failed.... int dummy=256; - do{ //we failed , so retry with 256 more chars + do{ //we failed, so retry with 256 more chars dummy+=256; //realloc m_ptr=(char *)kvi_realloc(m_ptr,dummy); @@ -1461,7 +1461,7 @@ int KviStr::base64ToBuffer(char ** buffer,bool) newLen -= 2; } else { // Single padding, two digits here - *auxBuf++ = (char)((aux1 << 2) | (aux2 >> 4)); // >> 4 is a shr , not a ror! :) + *auxBuf++ = (char)((aux1 << 2) | (aux2 >> 4)); // >> 4 is a shr, not a ror! :) *auxBuf++ = (char)((aux2 << 4) | (aux3 >> 2)); newLen -= 1; } @@ -1473,7 +1473,7 @@ int KviStr::base64ToBuffer(char ** buffer,bool) *buffer = 0; return -1; } else { - // Ok , no padding, three digits here + // Ok, no padding, three digits here *auxBuf++ = (char)((aux1 << 2) | (aux2 >> 4)); *auxBuf++ = (char)((aux2 << 4) | (aux3 >> 2)); *auxBuf++ = (char)((aux3 << 6) | aux4); @@ -1570,7 +1570,7 @@ void KviStr::append(const char *str,int len) *(m_ptr + m_len)='\0'; } -void KviStr::append(KviFormatConstructorTag ,const char *fmt,...) +void KviStr::append(KviFormatConstructorTag,const char *fmt,...) { int auxLen; m_ptr=(char *)kvi_realloc(m_ptr,m_len + 256); @@ -1583,9 +1583,9 @@ void KviStr::append(KviFormatConstructorTag ,const char *fmt,...) //check if we failed if(auxLen < 0){ - //yes , failed.... + //yes, failed.... int dummy=256; - do{ //we failed , so retry with 256 more chars + do{ //we failed, so retry with 256 more chars dummy+=256; //realloc m_ptr=(char *)kvi_realloc(m_ptr,m_len + dummy); @@ -2450,7 +2450,7 @@ long KviStr::toLongExt(bool *bOk,int base) char * endptr; long result = strtol(m_ptr,&endptr,base); if(*endptr){ - // must be whitespaces , otherwise there is trailing garbage inside + // must be whitespaces, otherwise there is trailing garbage inside while(isspace(*endptr) && (*endptr))endptr++; if(*endptr){ // still not at the end @@ -2464,7 +2464,7 @@ long KviStr::toLongExt(bool *bOk,int base) } // -//working code , but unused in kvirc +//working code, but unused in kvirc // //unsigned long KviStr::toULongExt(bool *bOk = 0,int base = 0) //{ @@ -2696,9 +2696,9 @@ KviStr & KviStr::vsprintf(const char *fmt,kvi_va_list list) //check if we failed if(m_len < 0) { - //yes , failed.... + //yes, failed.... int dummy=256; - do { //we failed , so retry with 256 more chars + do { //we failed, so retry with 256 more chars dummy+=256; //realloc m_ptr=(char *)kvi_realloc(m_ptr,dummy); @@ -2726,9 +2726,9 @@ KviStr & KviStr::sprintf(const char *fmt,...) //check if we failed if(m_len < 0){ - //yes , failed.... + //yes, failed.... int dummy=256; - do{ //we failed , so retry with 256 more chars + do{ //we failed, so retry with 256 more chars dummy+=256; //realloc m_ptr=(char *)kvi_realloc(m_ptr,dummy); @@ -2862,7 +2862,7 @@ int KviStr::findLastIdx(char c) const register char *p=((m_ptr+m_len)-1); //go back until we find a match or we run to the first char in the string. while((*p != c) && (p > m_ptr))p--; - //if *p == c --> matched , else we are at the beginning of the string. + //if *p == c --> matched, else we are at the beginning of the string. return ((*p == c)? p-m_ptr : -1); } @@ -2926,7 +2926,7 @@ KviStr & KviStr::trimmed() // skip initial spaces while(isspace(*left))left++; if(*left){ - // valid string , left points to first non-space + // valid string, left points to first non-space while((right >= left) && isspace(*right))right--; // 0123456789 // abcd 0 @@ -2990,7 +2990,7 @@ KviStr & KviStr::stripSpace() // skip initial spaces while((*left == ' ') || (*left == '\t'))left++; if(*left){ - // valid string , left points to first non-space + // valid string, left points to first non-space while((right >= left) && ((*right == ' ') || (*right == '\t')))right--; // 0123456789 // abcd 0 diff --git a/src/kvilib/core/kvi_string.h b/src/kvilib/core/kvi_string.h index 5399227fb..3c56a6e14 100644 --- a/src/kvilib/core/kvi_string.h +++ b/src/kvilib/core/kvi_string.h @@ -84,7 +84,7 @@ __KVI_EXTERN KVILIB_API bool kvi_strEqualCI(const char *str1,const char *str2); // Note that if str1 or str2 are shorter than len characters then are considered as NOT equal! __KVI_EXTERN KVILIB_API bool kvi_strEqualCIN(const char *str1,const char *str2,int len); // My own implementations of strcmp and strncasecmp -// Once I wrote it , I KNOW what they do : ALWAYS :) +// Once I wrote it, I KNOW what they do : ALWAYS :) // Note that greater here means that comes AFTER in the alphabetic order. __KVI_EXTERN KVILIB_API int kvi_strcmpCI(const char *str1,const char *str2); //__KVI_EXTERN KVILIB_API int kvi_strcmpCIN(const char *str1,const char *str2,int len); @@ -115,7 +115,7 @@ public: // No particular reason for these two names... // It is just because I like it :) - enum KviFormatConstructorTag { Format , Sprintf }; + enum KviFormatConstructorTag { Format, Sprintf }; //============================================================================= // Constructors @@ -162,7 +162,7 @@ public: ~KviStr(); public: //yes...public..but think it as private...:) - char *m_ptr; // pointer to allocated buffer , do not change this! + char *m_ptr; // pointer to allocated buffer, do not change this! int m_len; // string data length not including the terminator public: @@ -204,7 +204,7 @@ public: KviStr upperISO88591() const; KviStr lowerISO88591() const; - // left , right & co. + // left, right & co. // all parameters are safety-checked KviStr left(int maxLen) const; KviStr right(int maxLen) const ; @@ -240,7 +240,7 @@ public: void append(const char *str,int len); // str CAN NOT be 0, and MUST be at least len chars long void append(KviFormatConstructorTag dummy,const char *fmt,...); - // prepend stuff , same as above + // prepend stuff, same as above void prepend(const KviStr &str); void prepend(const char *str); // str CAN be 0 void prepend(const char *str,int len); // str CAN NOT be 0, and MUST be at least len chars long @@ -257,7 +257,7 @@ public: // Assignment KviStr & operator=(const KviStr &str); // deep copy KviStr & operator=(const char *str); // str can be NULL here - KviStr & operator=(char c); // 2 bytes allocated ,m_len = 1 + KviStr & operator=(char c); // 2 bytes allocated,m_len = 1 KviStr & operator=(const QString &str); KviStr & operator=(const QByteArray &str); @@ -338,7 +338,7 @@ public: // Tokenize //============================================================================= - // Extracts (copy to str and remove) a token from this string ,<br> + // Extracts (copy to str and remove) a token from this string,<br> // and returns true if there are more tokens to extract<br> // Does not strip initial separators!!<br> // str can NOT be this string. @@ -356,8 +356,8 @@ public: //KviStr ** splitToArray(const char * sep,int max,int * realCount) const; static void freeArray(KviStr ** strings); // joins the array to this string - // if sep is not 0 , it is inserted between the strings - // if bLastSep is true and sep is non 0 , then sep is also appended at the end + // if sep is not 0, it is inserted between the strings + // if bLastSep is true and sep is non 0, then sep is also appended at the end // of the buffer (after the last string) void joinFromArray(KviStr ** strings,const char * sep = 0,bool bLastSep = false); @@ -472,8 +472,8 @@ public: // Cool string parsing function. -// It will extract the first found token from the string aux_ptr , and return -// a pointer to the beginning of the next token , or end of the string. +// It will extract the first found token from the string aux_ptr, and return +// a pointer to the beginning of the next token, or end of the string. // It skips the initial sep characters! __KVI_EXTERN KVILIB_API const char * kvi_extractToken(KviStr &str,const char *aux_ptr,char sep =' '); // Does not skip the beginning separators! diff --git a/src/kvilib/ext/kvi_animatedpixmap.h b/src/kvilib/ext/kvi_animatedpixmap.h index b0f52748d..699b2c493 100644 --- a/src/kvilib/ext/kvi_animatedpixmap.h +++ b/src/kvilib/ext/kvi_animatedpixmap.h @@ -64,7 +64,8 @@ * This class owns all pixmaps. Do not store links to them. */ -class KVILIB_API KviAnimatedPixmap : public QObject , public KviAnimatedPixmapInterface{ +class KVILIB_API KviAnimatedPixmap : public QObject, public KviAnimatedPixmapInterface +{ Q_OBJECT protected: diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp index 33c72bace..d8347e01d 100644 --- a/src/kvilib/ext/kvi_config.cpp +++ b/src/kvilib/ext/kvi_config.cpp @@ -195,7 +195,7 @@ bool KviConfig::load() } else { // just readed something but less than expected // check if the last readed char is a newline - // if it isn't , fake it + // if it isn't, fake it if(*(p + readedLen - 1) != '\n') { *(p + readedLen) = '\n'; @@ -378,7 +378,7 @@ bool KviConfig::load() switch(*(dataLine.ptr())) { case '#': - // just skip it , it is a comment + // just skip it, it is a comment break; case '[': { diff --git a/src/kvilib/ext/kvi_config.h b/src/kvilib/ext/kvi_config.h index 45ed61e1d..1b2e269f4 100644 --- a/src/kvilib/ext/kvi_config.h +++ b/src/kvilib/ext/kvi_config.h @@ -48,7 +48,7 @@ typedef KviPointerHashTableIterator<QString,KviConfigGroup> KviConfigIterator; class KVILIB_API KviConfig : public KviHeapObject { public: - enum FileMode { Read = 1 , Write = 2 , ReadWrite = 3 }; + enum FileMode { Read = 1, Write = 2, ReadWrite = 3 }; public: KviConfig(const QString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); KviConfig(const char *filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); @@ -74,7 +74,7 @@ public: // If the group is not existing it will be effectively // created only at the first attempt to read from it or write to it. // With this flag set to true the KviConfig class will - // write down also the empty groups , and calls to setGroup() + // write down also the empty groups, and calls to setGroup() // will create the groups if not existing yet (and set the config data // as modified). // @@ -125,7 +125,7 @@ public: void writeEntry(const QString & szKey,const QRect &rct); QStringList readStringListEntry(const QString & szKey,const QStringList &list = QStringList()); void writeEntry(const QString & szKey,const QStringList &list); - QList<int> readIntListEntry(const QString & ,const QList<int> &list); + QList<int> readIntListEntry(const QString &,const QList<int> &list); void writeEntry(const QString & szKey,const QList<int> &list); QString readQStringEntry(const QString & szKey,const QString &szDefault = QString()) { return readEntry(szKey,szDefault); }; diff --git a/src/kvilib/ext/kvi_crypt.cpp b/src/kvilib/ext/kvi_crypt.cpp index c5a78a284..4f6e81177 100644 --- a/src/kvilib/ext/kvi_crypt.cpp +++ b/src/kvilib/ext/kvi_crypt.cpp @@ -42,7 +42,7 @@ Crypt/text transformation engines and how to use them @body: [big]Introduction[/big][br] - Well , there is a concrete background noise about security around the net. + Well, there is a concrete background noise about security around the net. And I've thought that adding a little cryptography support to KVIrc wasn't a bad idea. So I've first comed out with the "crypt engines", that allowed to have secure conversations on channels, queries and dcc chats; @@ -83,8 +83,8 @@ [big]Yes, but why cryptography (on IRC) ?[/big][br] Because it MAY be useful. More than once people have asked me to add some - crypting support to the dcc chats. Yes , I know that there are other - "secure communication" tools , but actually I can't find one that is able to + crypting support to the dcc chats. Yes, I know that there are other + "secure communication" tools, but actually I can't find one that is able to implement a "secure real time conversation". And what about a MULTIPLE real time secure conversation ? This can be done on an IRC channel now.[br] @@ -125,7 +125,7 @@ and play with the CTRL+P escape.[br] [big]The protocol[/big][br] - Well, there is no protocol actually , only the existing implementations , that + Well, there is no protocol actually, only the existing implementations, that can be accessed by anyone that want to reproduce them. There are only some points relating to the crypting engines that need to be cleared:[br] The crypted text must be suitable to be sent thru an IRC connection; diff --git a/src/kvilib/ext/kvi_crypt.h b/src/kvilib/ext/kvi_crypt.h index f3ebfb047..4cd679895 100644 --- a/src/kvilib/ext/kvi_crypt.h +++ b/src/kvilib/ext/kvi_crypt.h @@ -32,7 +32,7 @@ // Base class for all IRC crypt engines // These intend to encrypt plain text into something // that can be sent through the IRC protocol... -// so it should not contain NULL, CR , LF and other +// so it should not contain NULL, CR, LF and other // similar stuff... // diff --git a/src/kvilib/ext/kvi_mediatype.cpp b/src/kvilib/ext/kvi_mediatype.cpp index a1fc7ced3..d0dafb3db 100644 --- a/src/kvilib/ext/kvi_mediatype.cpp +++ b/src/kvilib/ext/kvi_mediatype.cpp @@ -146,7 +146,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) int iNonWildCountExisting = mt->szFileMask.len() - iWildCountExisting; if(iNonWildCountExisting < iNonWildCount) { - // ok...the new one has more non-wildcards , insert + // ok...the new one has more non-wildcards, insert m_pMediaTypeList->insert(index,m); return; } else { @@ -250,7 +250,7 @@ KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckM szFile.cutToLast('/',true); - // first of all , lstat() the file + // first of all, lstat() the file #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) struct _stat st; if(_stat(szFullPath.ptr(),&st) != 0) @@ -262,10 +262,10 @@ KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckM //qDebug("Problems while stating file %s",szFullPath.ptr()); // We do just the pattern matching // it's better to avoid magic checks - // if the file is a device , we would be blocked while attempting to read data + // if the file is a device, we would be blocked while attempting to read data return findMediaTypeForRegularFile(szFullPath.ptr(),szFile.ptr(),false); } else { - // If it is a link , stat() the link target + // If it is a link, stat() the link target #if !defined(COMPILE_ON_WINDOWS) && !defined(COMPILE_ON_MINGW) if(S_ISLNK(st.st_mode)) { diff --git a/src/kvilib/ext/kvi_msgtype.h b/src/kvilib/ext/kvi_msgtype.h index 11b0e95cb..15fd8c1e4 100644 --- a/src/kvilib/ext/kvi_msgtype.h +++ b/src/kvilib/ext/kvi_msgtype.h @@ -38,7 +38,7 @@ // 1 : Common activity // 2 : People talking -// 3 : Response messages (whois , dns) +// 3 : Response messages (whois, dns) // 4 : // 5 : Highlighted text diff --git a/src/kvilib/ext/kvi_proxydb.h b/src/kvilib/ext/kvi_proxydb.h index db91ef8ae..4f3583e04 100644 --- a/src/kvilib/ext/kvi_proxydb.h +++ b/src/kvilib/ext/kvi_proxydb.h @@ -34,7 +34,7 @@ class KVILIB_API KviProxy { public: - enum Protocol { Socks4 , Socks5 , Http }; + enum Protocol { Socks4, Socks5, Http }; KviProxy(); KviProxy(const KviProxy &prx); ~KviProxy(); diff --git a/src/kvilib/ext/kvi_regchan.cpp b/src/kvilib/ext/kvi_regchan.cpp index 6f764d199..4dc898917 100644 --- a/src/kvilib/ext/kvi_regchan.cpp +++ b/src/kvilib/ext/kvi_regchan.cpp @@ -193,7 +193,7 @@ void KviRegisteredChannelDataBase::add(KviRegisteredChannel * c) { if(rc->netMask().count(QChar('*')) > o) { - // the existing has more wildcards , insert here! + // the existing has more wildcards, insert here! l->insert(idx,c); return; } diff --git a/src/kvilib/ext/kvi_regusersdb.cpp b/src/kvilib/ext/kvi_regusersdb.cpp index 3a18e74a0..f687a0182 100644 --- a/src/kvilib/ext/kvi_regusersdb.cpp +++ b/src/kvilib/ext/kvi_regusersdb.cpp @@ -71,7 +71,7 @@ For this reason putting wildcards in nicknames could become a problem if not used carefully (but may also be used to achieve interesting tricks).[br] If you don't use wildcards in nicknames you are sure that - in a single irc connection , a mask will always refer to a single user.[br] + in a single irc connection, a mask will always refer to a single user.[br] You will commonly use the following format:[br] <nick>!*<username>@*.<host>.<top>[br] or[br] @@ -94,7 +94,7 @@ On the other hand, if you dislike the users with the nickname Eddie that come from .org and you're implementing an auto-kick system, the correct mask to register is "Eddie!*@*.org".[br] [br] - KVirc ties to be smart , and always find the most correct match for an user: + KVirc ties to be smart, and always find the most correct match for an user: If you have two masks registered: Pragma!*xor@*.myisp.it and *!*@*.myisp.it, kvirc will match Pragma!~xor@233-dyn.myisp.it with the first one even if the second one matches too; the firs one is a best match.[br] @@ -268,7 +268,7 @@ bool KviRegisteredUser::getBoolProperty(const QString & name,bool def) QString * pValue = m_pPropertyDict->find(name); if(pValue) { - // be flexible , allow more "true" values (pragma) + // be flexible, allow more "true" values (pragma) if(KviQString::equalCS(*pValue,"1"))return true; if(KviQString::equalCI(*pValue,"true"))return true; if(KviQString::equalCI(*pValue,"yes"))return true; diff --git a/src/kvilib/ext/kvi_regusersdb.h b/src/kvilib/ext/kvi_regusersdb.h index 77f0acbf7..6c915f220 100644 --- a/src/kvilib/ext/kvi_regusersdb.h +++ b/src/kvilib/ext/kvi_regusersdb.h @@ -130,8 +130,8 @@ private: class KVILIB_API KviRegisteredMask { private: - KviRegisteredUser * m_pUser; // pointer , not owned! - KviIrcMask * m_pMask; // pointer , not owned! + KviRegisteredUser * m_pUser; // pointer, not owned! + KviIrcMask * m_pMask; // pointer, not owned! int m_iMaskNonWildChars; public: KviRegisteredMask(KviRegisteredUser * u,KviIrcMask * m); diff --git a/src/kvilib/ext/kvi_sharedfiles.cpp b/src/kvilib/ext/kvi_sharedfiles.cpp index 2cd838fbe..897062ef7 100644 --- a/src/kvilib/ext/kvi_sharedfiles.cpp +++ b/src/kvilib/ext/kvi_sharedfiles.cpp @@ -49,14 +49,14 @@ @body: [big]What is this ?[/big] The "file offers" are a simple way to share your files with other IRC users.[br] - Basically , you setup an offer by selecting a local file, choosing a "visible name" for it. + Basically, you setup an offer by selecting a local file, choosing a "visible name" for it. Remote users will be able to request you the file and download it automatically by issuing a simple DCC GET request.[br] [big]Details[/big] Each offer refers to an existing file on one of your locally mounted file systems. The offer is given a visible name that the remote users will effectively request. To share the file /usr/arch/mp3/SonataArctica_SingInSilence_Live.mp3 you will add a file offer - with /usr/arch/mp3/SonataArctica_SingInSilence_Live.mp3 as real file path , something like + with /usr/arch/mp3/SonataArctica_SingInSilence_Live.mp3 as real file path, something like "SonataArctica_SingInSilence.mp3". A remote user will then request you a DCC GET SonataArctica_SingInSilence.mp3 and KVIrc will automatically send the file.[br] Each file offer has an "user mask" that the requesting remote users must match to @@ -177,7 +177,7 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) // the ones with more non-wild chars go first... if(fo->nonWildcardCount() < o->nonWildcardCount()) { - // ok...the new one has more non-wildcards , insert + // ok...the new one has more non-wildcards, insert l->insert(index,o); return; } else { diff --git a/src/kvilib/file/kvi_fileutils.cpp b/src/kvilib/file/kvi_fileutils.cpp index 346e5fc86..eb1a23e7d 100644 --- a/src/kvilib/file/kvi_fileutils.cpp +++ b/src/kvilib/file/kvi_fileutils.cpp @@ -38,7 +38,7 @@ namespace KviFileUtils { - static char cHexChars[16] = { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' }; + static char cHexChars[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /* WORKING CODE BUT UNUSED FOR NOW @@ -92,7 +92,7 @@ namespace KviFileUtils { szBuffer.append('\n'); // readLine returned true...last char was a newline } - // readLine returned false , no ending newline encountered + // readLine returned false, no ending newline encountered return true; } */ diff --git a/src/kvilib/irc/kvi_avatar.cpp b/src/kvilib/irc/kvi_avatar.cpp index f5ff0003f..56a0d16f0 100644 --- a/src/kvilib/irc/kvi_avatar.cpp +++ b/src/kvilib/irc/kvi_avatar.cpp @@ -81,7 +81,7 @@ B may then reply with a standard DCC SEND or a DCC RSEND (kvirc's extension).[br] The implementation of the DCC GET protocol is defined by other documents here around :).[br] [br] - The CTCP AVATAR messages can be sent to a single user , a set of users or a channel: + The CTCP AVATAR messages can be sent to a single user, a set of users or a channel: this depends only on the source user and how many clients he wants to reach. [br] There should be a convention on the image sizes: not a protocol limit. diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp index 3a34078af..403da3cb8 100644 --- a/src/kvilib/irc/kvi_ircmask.cpp +++ b/src/kvilib/irc/kvi_ircmask.cpp @@ -36,7 +36,7 @@ @short: Decription of the standard IRC masks @keyterms: - irc masks , nickname , username , hostname , wildcard + irc masks, nickname, username, hostname, wildcard @body: [big]Simple masks[/big][br] An irc mask is a string in a special format that identifies an user on irc.[br] @@ -51,7 +51,7 @@ Some IRC servers allow specifying this username inside the login messages and do not connect to the ident service at all.[br] The <username> often has a special prefix character added by the irc server:[br] - this is rather server specific protocol , but the prefixes are somewhat standardized and + this is rather server specific protocol, but the prefixes are somewhat standardized and the common meanings of them are:[br] noprefix: I line with ident[br] ^: I line with OTHER type ident[br] @@ -79,12 +79,12 @@ In some contexts the irc-masks can contain '*' and '?' wildcards.[br] The wild masks are used to "match" an user within a set of them.[br] '*' matches any sequence (eventually empty) of characters and '?' matches a single character.[br] - Wildcards are allowed only in the <nick> , <user> and <host> part: so the + Wildcards are allowed only in the <nick>, <user> and <host> part: so the "wildest" mask possible is:[br] [b]*!*@*[/b][br] that designates "any nickname, any username on any host".[br] Here are some examples of wild masks:[br] - Pragma!*pragma@212.101.102.*: matches any user with nickname "Pragma" , username that ends with "pragma" and + Pragma!*pragma@212.101.102.*: matches any user with nickname "Pragma", username that ends with "pragma" and coming from any machine on the 212.101.102 network.[br] *!solo@*.starwars.org: matches any nick with username solo (no prefix!) coming from any machine in the starwars.org domain.[br] @@ -171,7 +171,7 @@ const char * KviIrcMask::setUserhostMask(const char *szMask) while(*p && ((*p=='*')||(*p=='=')||(*p=='+')||(*p=='-')) && (!isspace(*p)))p++; // check... if((!(*p)) || isspace(*p)){ - // ooops , finished or isspace + // ooops, finished or isspace setHost("*"); setUsername("*"); while(*p && isspace(*p))p++; @@ -315,7 +315,7 @@ bool KviIrcMask::hasNumericHost() const /** * Returns in szMask the specified (if possible) mask of this user.<br> -* If the host or username are not known , the mask may contain less information +* If the host or username are not known, the mask may contain less information * than requested.<br> * Mask types:<br> * 0 : nick!user@machine.host.top (nick!user@XXX.XXX.XXX.XXX) (default)<br> @@ -347,8 +347,8 @@ bool KviIrcMask::hasNumericHost() const * 24: *!~user@*.host.top (*!~user@XXX.XXX.*) * 25: nick!*user@*.host.top (nick!*user@XXX.XXX.*) * 26: *!*user@*.host.top (*!user@*XXX.XXX.*) -* If some data is missing , these types may change:<br> -* For example , if hostname is missing , the mask type 3 or 4 may be reduced to type 5 +* If some data is missing, these types may change:<br> +* For example, if hostname is missing, the mask type 3 or 4 may be reduced to type 5 */ /* diff --git a/src/kvilib/irc/kvi_ircmask.h b/src/kvilib/irc/kvi_ircmask.h index 127327778..215995ca0 100644 --- a/src/kvilib/irc/kvi_ircmask.h +++ b/src/kvilib/irc/kvi_ircmask.h @@ -154,13 +154,13 @@ public: */ void setHost(const QString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; }; - // Sets the host , nick and username extracting it from an irc mask: + // Sets the host, nick and username extracting it from an irc mask: // nick!user@host // The mask is terminated by end-of string null character or a character equal to c in the string. // Returns the pointer to the end of the mask in the szMask string.(c or null-terminator) //const char * setMask(const QString &szMask,char c=' '); - // Sets the host , nick and username extracting it from an userhost mask: + // Sets the host, nick and username extracting it from an userhost mask: // nick[*]=<+|->user@host // The mask is terminated by end-of string null char or a space character. // Returns the pointer to the next non-space char in the szMask string or to the null-terminator @@ -213,7 +213,7 @@ public: /** * \brief Returns in szMask the specified (if possible) mask of this user. * - * If the host or username are not known , the mask may contain less + * If the host or username are not known, the mask may contain less * information than requested. * \param szMask The mask of the user * \param eMaskType The mask type @@ -237,7 +237,7 @@ public: bool matches(const KviIrcMask & mask) const; /** - * \brief Fixed external matches (this is wild , external is fixed) + * \brief Fixed external matches (this is wild, external is fixed) * \param nick The nickname of the user * \param user The username of the user * \param host The hostname of the user @@ -247,7 +247,7 @@ public: //bool matchesFixed(const QString &szMask) const; /** - * \brief Fixed external matches (this is wild , external is fixed) + * \brief Fixed external matches (this is wild, external is fixed) * \param mask The make of the user * \return bool */ diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp index 4dcf2785a..c0ea7221b 100644 --- a/src/kvilib/irc/kvi_ircserverdb.cpp +++ b/src/kvilib/irc/kvi_ircserverdb.cpp @@ -285,7 +285,7 @@ search_finished: } } - // a valid hostname or ip address , not found in list : add it and make it current + // a valid hostname or ip address, not found in list : add it and make it current r = m_pRecords->find(__tr2qs("Standalone Servers")); if(!r) diff --git a/src/kvilib/irc/kvi_mirccntrl.cpp b/src/kvilib/irc/kvi_mirccntrl.cpp index 64f7893e1..4a85e2fce 100644 --- a/src/kvilib/irc/kvi_mirccntrl.cpp +++ b/src/kvilib/irc/kvi_mirccntrl.cpp @@ -33,7 +33,7 @@ KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1 // and fills the color values in the two bytes // - //First we can have a digit or a coma + //First we can have a digit or a comma if(((*data_ptr >= '0') && (*data_ptr <='9'))) { //Something interesting ok. @@ -44,7 +44,7 @@ KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1 //Yes we can understand it if(*data_ptr==',') { - //A coma , need to check for background + //A comma, need to check for background data_ptr++; } else { //A number @@ -52,7 +52,7 @@ KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1 data_ptr++; if(*data_ptr==',') { - //A coma , need to check for background + //A comma, need to check for background data_ptr++; } else { //Senseless return @@ -74,7 +74,7 @@ KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1 if((*data_ptr >= '0') && (*data_ptr <='9')) { - //Background , a color code + //Background, a color code (*byte_2)=(*data_ptr)-'0'; data_ptr++; if((*data_ptr >= '0') && (*data_ptr <='9')) @@ -97,7 +97,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign // and fills the color values in the two bytes // - //First we can have a digit or a coma + //First we can have a digit or a comma if(((*data_ptr >= '0') && (*data_ptr <='9'))) { //Something interesting ok. @@ -108,7 +108,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign //Yes we can understand it if(*data_ptr==',') { - //A coma , need to check for background + //A comma, need to check for background data_ptr++; } else { //A number @@ -117,7 +117,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign data_ptr++; if(*data_ptr==',') { - //A coma , need to check for background + //A comma, need to check for background data_ptr++; } else { //Senseless return @@ -139,7 +139,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign if((*data_ptr >= '0') && (*data_ptr <='9')) { - //Background , a color code + //Background, a color code (*byte_2)=(*data_ptr)-'0'; data_ptr++; if((*data_ptr >= '0') && (*data_ptr <='9')) @@ -171,7 +171,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int unsigned short c = szData[(int)charIdx].unicode(); - //First we can have a digit or a coma + //First we can have a digit or a comma if(((c < '0') || (c > '9'))) { // senseless : only a CTRL+K code @@ -233,7 +233,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int return charIdx; } - //Background , a color code + //Background, a color code (*byte_2)=c-'0'; charIdx++; if(charIdx >= (unsigned int) szData.length())return charIdx; diff --git a/src/kvilib/irc/kvi_mirccntrl.h b/src/kvilib/irc/kvi_mirccntrl.h index 099fbfde6..c85c52714 100644 --- a/src/kvilib/irc/kvi_mirccntrl.h +++ b/src/kvilib/irc/kvi_mirccntrl.h @@ -98,19 +98,19 @@ // 013 CR Carriage return (Should not be assigned: terminal control) // 014 SO Shift out (Should not be assigned: terminal control) // 015 SI Shift in ( Resets Bold,Color,Underline and Reverse ) (Conflicting with terminal control) -// 016 DLE Data link escape (Decent , can be assigned) +// 016 DLE Data link escape (Decent, can be assigned) // 017 DC1 Device control 1 (Good to be assigned) // 018 DC2 Device control 2 (Good to be assigned) // 019 DC3 Device control 3 (Good to be assigned) // 020 DC4 Device control 4 (Good to be assigned) // 021 NAK Negative acknowledge (Not so good, but could be used as last resource) // 022 SYN Synchronous idle ( Reverse text ) -// 023 ETB End of transmission block (Decent , can be assigned) +// 023 ETB End of transmission block (Decent, can be assigned) // 024 CAN Cancel (Should not be assigned: terminal control) -// 025 EM End of medium (Decent , can be assigned) +// 025 EM End of medium (Decent, can be assigned) // 026 SUB Substitute (Should not be assigned: terminal control) // 027 ESC Escape (Should not be assigned: terminal control) -// 028 FS File separator (Excellent , should be used as first candidate) +// 028 FS File separator (Excellent, should be used as first candidate) // 029 GS Group separator ( ICONS Escape: beginning of a word ) // 030 RS Record separator ( CRYPT Escape: only beginning of the message ) // 031 US Unit separator ( Underline text ) diff --git a/src/kvilib/irc/kvi_nickserv.cpp b/src/kvilib/irc/kvi_nickserv.cpp index d0a51bf8f..20a9a7f6b 100644 --- a/src/kvilib/irc/kvi_nickserv.cpp +++ b/src/kvilib/irc/kvi_nickserv.cpp @@ -49,7 +49,7 @@ it from being stolen by others.[br] The NickServ protocol is not standardized (at the time that I'm writing this doc) and automatic authentication is a pure experimental protocol.[br] - Once you get on IRC with a registered nickname , the NickServ will + Once you get on IRC with a registered nickname, the NickServ will ask you for identification by sending you a NOTICE.[br] The message will look in a way similar to the following:[br] <b>You're using a registered nickname: if this is your nick, @@ -63,7 +63,7 @@ */ -// FIXME: The doc above is a bit outdated , fix it +// FIXME: The doc above is a bit outdated, fix it KviNickServRuleSet::KviNickServRuleSet() : KviHeapObject() diff --git a/src/kvilib/net/kvi_dns.h b/src/kvilib/net/kvi_dns.h index 146cf4c86..421bbed07 100644 --- a/src/kvilib/net/kvi_dns.h +++ b/src/kvilib/net/kvi_dns.h @@ -71,8 +71,8 @@ public: KviDns(); ~KviDns(); public: - enum QueryType { IPv4 , IPv6 , Any }; - enum State { Idle , Busy , Failure , Success }; + enum QueryType { IPv4, IPv6, Any }; + enum State { Idle, Busy, Failure, Success }; protected: void * m_pAuxData; KviDnsThread * m_pSlaveThread; diff --git a/src/kvilib/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp index e31304741..bf13754fe 100644 --- a/src/kvilib/net/kvi_http.cpp +++ b/src/kvilib/net/kvi_http.cpp @@ -609,7 +609,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if((uStatus != 200) && (uStatus != 206)) { // this is not "OK" and not "Partial content" - // Error , redirect or something confusing + // Error, redirect or something confusing // FIXME: Handle 30x codes by re-issuing the request with the new URI ? @@ -1076,7 +1076,7 @@ bool KviHttpRequestThread::connectToRemoteHost() { // Declare problems :) return failure(__tr_no_lookup("Unrecoverable SSL error during handshake")); - } // else can recover ? (EAGAIN , EINTR ?) ... should select for read or for write + } // else can recover ? (EAGAIN, EINTR ?) ... should select for read or for write } break; default: diff --git a/src/kvilib/net/kvi_http.h b/src/kvilib/net/kvi_http.h index 08bf40e88..cc662c549 100644 --- a/src/kvilib/net/kvi_http.h +++ b/src/kvilib/net/kvi_http.h @@ -169,7 +169,7 @@ class KviHttpRequestThread : public KviSensitiveThread { friend class KviHttpRequest; public: - enum RequestMethod { Post, Get , Head }; + enum RequestMethod { Post, Get, Head }; protected: KviHttpRequestThread(KviHttpRequest * r, const QString &szHost, diff --git a/src/kvilib/net/kvi_netutils.cpp b/src/kvilib/net/kvi_netutils.cpp index 4d54db8e7..0618ea64f 100644 --- a/src/kvilib/net/kvi_netutils.cpp +++ b/src/kvilib/net/kvi_netutils.cpp @@ -356,7 +356,7 @@ unsigned int fmt_ip6(char *s,const char ip[16]) unsigned int len; unsigned int i; unsigned int temp; - unsigned int compressing; // 0 not compressing , 1 compressing now , 2 already compressed once + unsigned int compressing; // 0 not compressing, 1 compressing now, 2 already compressed once len = 0; compressing = 0; diff --git a/src/kvilib/net/kvi_socket.h b/src/kvilib/net/kvi_socket.h index c0df31323..a0572cd70 100644 --- a/src/kvilib/net/kvi_socket.h +++ b/src/kvilib/net/kvi_socket.h @@ -99,7 +99,7 @@ // kvi_socket_create // kvi_socket_open // -// Open a socket of the specified protocol family , type and protocol +// Open a socket of the specified protocol family, type and protocol // You should always use the KVI_SOCKET_* constants as parameters // Returns KVI_INVALID_SOCKET if the socket creation has failed. // The returned socket is in blocking mode! diff --git a/src/kvilib/net/kvi_ssl.h b/src/kvilib/net/kvi_ssl.h index 267b7d111..5289f1bfe 100644 --- a/src/kvilib/net/kvi_ssl.h +++ b/src/kvilib/net/kvi_ssl.h @@ -144,9 +144,9 @@ public: class KVILIB_API KviSSL { public: - enum Method { Client , Server }; - enum Result { Success , NotInitialized , WantRead , WantWrite , ZeroReturn , FileIoError , - UnknownError , ObscureError , SSLError , SyscallError , RemoteEndClosedConnection }; + enum Method { Client, Server }; + enum Result { Success, NotInitialized, WantRead, WantWrite, ZeroReturn, FileIoError, + UnknownError, ObscureError, SSLError, SyscallError, RemoteEndClosedConnection }; public: KviSSL(); ~KviSSL(); diff --git a/src/kvilib/system/kvi_env.cpp b/src/kvilib/system/kvi_env.cpp index 6d72f460f..406a42d24 100644 --- a/src/kvilib/system/kvi_env.cpp +++ b/src/kvilib/system/kvi_env.cpp @@ -56,7 +56,7 @@ bool kvi_setenv(const char * name,const char * value) #else bool kvi_setenv(const char *,const char *) { - // no setenv , no putenv.. what the hell of system is this ? + // no setenv, no putenv.. what the hell of system is this ? return false; #endif #endif @@ -82,7 +82,7 @@ void kvi_unsetenv(const char * name) // hmmm if(kvi_getenv(name) == 0) { - // ok , the string is not in the environment + // ok, the string is not in the environment // we can free it kvi_free(buf); } // else this system sux @@ -90,7 +90,7 @@ void kvi_unsetenv(const char * name) #else void kvi_unsetenv(const char *) { - // no setenv , no putenv.. what the hell of system is this ? + // no setenv, no putenv.. what the hell of system is this ? #endif #endif } diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp index 36babd25d..6cc880ceb 100644 --- a/src/kvilib/system/kvi_locale.cpp +++ b/src/kvilib/system/kvi_locale.cpp @@ -401,8 +401,8 @@ KviMessageCatalogue::KviMessageCatalogue() //m_uEncoding = 0; m_pTextCodec = QTextCodec::codecForLocale(); - //m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(1123,true,false); // dictSize, case sensitive , don't copy keys - m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(32,true,false); // dictSize, case sensitive , don't copy keys + //m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(1123,true,false); // dictSize, case sensitive, don't copy keys + m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(32,true,false); // dictSize, case sensitive, don't copy keys m_pMessages->setAutoDelete(true); } @@ -514,7 +514,7 @@ bool KviMessageCatalogue::load(const QString& name) int dictSize = kvi_getFirstBiggerPrime(numberOfStrings); if(m_pMessages) delete m_pMessages; - m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(dictSize,true,false); // dictSize, case sensitive , don't copy keys + m_pMessages = new KviPointerHashTable<const char *,KviTranslationEntry>(dictSize,true,false); // dictSize, case sensitive, don't copy keys m_pMessages->setAutoDelete(true); KviStr szHeader; @@ -551,7 +551,7 @@ bool KviMessageCatalogue::load(const QString& name) m_pTextCodec = 0; - // find out the text encoding , if possible + // find out the text encoding, if possible if(szHeader.hasData()) { // find "charset=*\n" diff --git a/src/kvilib/system/kvi_locale.h b/src/kvilib/system/kvi_locale.h index 0241b72ca..665628b27 100644 --- a/src/kvilib/system/kvi_locale.h +++ b/src/kvilib/system/kvi_locale.h @@ -70,13 +70,13 @@ public: QString * m_pQTranslation; public: KviTranslationEntry(char * keyptr,int keylen,char * trptr,int trlen) - : m_szKey(keyptr,keylen) , m_szEncodedTranslation(trptr,trlen) + : m_szKey(keyptr,keylen), m_szEncodedTranslation(trptr,trlen) { m_pQTranslation = 0; } KviTranslationEntry(const char * keyandtr) - : m_szKey(keyandtr) , m_szEncodedTranslation(keyandtr) + : m_szKey(keyandtr), m_szEncodedTranslation(keyandtr) { m_pQTranslation = 0; } diff --git a/src/kvilib/system/kvi_thread.cpp b/src/kvilib/system/kvi_thread.cpp index f96efecf7..bb5d37d40 100644 --- a/src/kvilib/system/kvi_thread.cpp +++ b/src/kvilib/system/kvi_thread.cpp @@ -56,7 +56,7 @@ static void kvi_threadIgnoreSigalarm() #if !defined(COMPILE_ON_WINDOWS) && !defined(COMPILE_ON_MINGW) // Funky hack for some Solaris machines (maybe others ?) // For an obscure (at least to me) reason - // when using threads ,some part of the system + // when using threads,some part of the system // starts kidding us by sending a SIGALRM in apparently // "random" circumstances. (Xlib ?) (XServer ?) // The default action for SIGALRM is to exit the application. @@ -150,7 +150,7 @@ static void kvi_threadInitialize() #define KVI_THREAD_PIPE_SIDE_SLAVE 1 // the maximum length of the slave->master queue -// over this length , the slave is forced to usleep() +// over this length, the slave is forced to usleep() #define KVI_THREAD_MAX_EVENT_QUEUE_LENGTH 50 static KviThreadManager * g_pThreadManager = 0; @@ -308,7 +308,7 @@ void KviThreadManager::postSlaveEvent(QObject *o,QEvent *e) m_pMutex->lock(); - // if the queue gets too long , make this (slave) thread sleep + // if the queue gets too long, make this (slave) thread sleep // there is a special case where we can't stop the slaves posting events // it's when a thread-master-side is waiting for it's thread-slave-side @@ -401,7 +401,7 @@ void KviThreadManager::eventsPending(int fd) } } - // ok , job done.. can relax now + // ok, job done.. can relax now m_pMutex->unlock(); #endif @@ -525,7 +525,7 @@ void KviThread::wait() void KviThread::exit() { - // We're on the slave side thread here! (m_bRunning is true , m_bStartingUp is false) + // We're on the slave side thread here! (m_bRunning is true, m_bStartingUp is false) setRunning(false); kvi_threadExit(); } diff --git a/src/kvilib/system/kvi_thread.h b/src/kvilib/system/kvi_thread.h index a569e7668..0cad423d3 100644 --- a/src/kvilib/system/kvi_thread.h +++ b/src/kvilib/system/kvi_thread.h @@ -141,7 +141,7 @@ // We don't care about exit codes at all #define kvi_threadExit() thr_exit(0) #else -// FIXME: #warning "Missing a decent thread implementation: we're going to fail , sorry!" +// FIXME: #warning "Missing a decent thread implementation: we're going to fail, sorry!" #endif #endif #endif @@ -197,7 +197,7 @@ public: // Returns the state of the thread...safe to call from anywhere bool isRunning(); // Returns the state of the thread...safe to call from anywhere - bool isStartingUp(); // start() called , but not in run() yet... + bool isStartingUp(); // start() called, but not in run() yet... // Waits for the termination of this thread: call only from external threads!!! :) void wait(); // DO NOT TOUCH THIS ONE! @@ -269,11 +269,11 @@ protected: KviThread * m_pSender; public: KviThreadEvent(int evId,KviThread * sender = 0) - : QEvent((QEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {}; + : QEvent((QEvent::Type)KVI_THREAD_EVENT), m_eventId(evId), m_pSender(sender) {}; virtual ~KviThreadEvent(){}; public: // This is the sender of the event - // WARNING : this MAY be null , threads CAN send anonymous events + // WARNING : this MAY be null, threads CAN send anonymous events KviThread * sender(){ return m_pSender; }; int id(){ return m_eventId; }; }; diff --git a/src/kvilib/system/kvi_time.h b/src/kvilib/system/kvi_time.h index 9fc812242..c5a7e490b 100644 --- a/src/kvilib/system/kvi_time.h +++ b/src/kvilib/system/kvi_time.h @@ -53,7 +53,7 @@ */ extern KVILIB_API void kvi_gettimeofday(struct timeval * tmv, struct timezone * tmz); #else - #include <sys/time.h> // gettimeofday() , struct timeval + #include <sys/time.h> // gettimeofday(), struct timeval /** * \brief Gets the time of the day diff --git a/src/kvirc/kernel/kvi_action.cpp b/src/kvirc/kernel/kvi_action.cpp index 74b885234..916dfb4ea 100644 --- a/src/kvirc/kernel/kvi_action.cpp +++ b/src/kvirc/kernel/kvi_action.cpp @@ -93,7 +93,7 @@ void KviAction::registerAccelerator() { if(!m_szKeySequence.isEmpty()) { - m_pAccel = new QShortcut(m_szKeySequence,g_pFrame,0 ,0 , Qt::ApplicationShortcut); + m_pAccel = new QShortcut(m_szKeySequence, g_pFrame, 0, 0, Qt::ApplicationShortcut); connect(m_pAccel,SIGNAL(activated()),this,SLOT(activate())); //no way to have Ctrl+Alt+Key events fired as no-ambiguous, probably qt bug connect(m_pAccel,SIGNAL(activatedAmbiguously()),this,SLOT(activate())); diff --git a/src/kvirc/kernel/kvi_actionmanager.h b/src/kvirc/kernel/kvi_actionmanager.h index 8c7d43d4e..387d9eae9 100644 --- a/src/kvirc/kernel/kvi_actionmanager.h +++ b/src/kvirc/kernel/kvi_actionmanager.h @@ -57,7 +57,7 @@ protected: static KviActionCategory * m_pCategoryGUI; static KviActionCategory * m_pCategoryChannel; static KviActionCategory * m_pCategoryTools; - // internal , current toolbar to be edited (only when customizing) + // internal, current toolbar to be edited (only when customizing) static KviCustomToolBar * m_pCurrentToolBar; bool m_bCoreActionsRegistered; public: diff --git a/src/kvirc/kernel/kvi_app.cpp b/src/kvirc/kernel/kvi_app.cpp index c6a649705..445deac37 100644 --- a/src/kvirc/kernel/kvi_app.cpp +++ b/src/kvirc/kernel/kvi_app.cpp @@ -547,7 +547,7 @@ void KviApp::setup() void KviApp::frameDestructorCallback() { - // here we should kill anything that depends on g_pFrame , g_pActiveWindow and related being non zero... + // here we should kill anything that depends on g_pFrame, g_pActiveWindow and related being non zero... // kill all the objects, while we have windows... if(KviKvsKernel::instance()) @@ -1494,7 +1494,7 @@ void KviApp::createFrame() if(m_szExecAfterStartup.hasData()) { - // FIXME , this should be a QString + // FIXME, this should be a QString KviKvsScript::run(m_szExecAfterStartup.ptr(),g_pFrame->firstConsole()); m_szExecAfterStartup = ""; } @@ -1950,7 +1950,7 @@ void KviApp::timerEvent(QTimerEvent * e) heartbeat(tNow); } -// qvariant.h uses this , and it is included by the qt generated moc file for Qt >= 3.0.0 +// qvariant.h uses this, and it is included by the qt generated moc file for Qt >= 3.0.0 #ifdef Bool #undef Bool #endif diff --git a/src/kvirc/kernel/kvi_app.h b/src/kvirc/kernel/kvi_app.h index 05476638c..5fd1b28c4 100644 --- a/src/kvirc/kernel/kvi_app.h +++ b/src/kvirc/kernel/kvi_app.h @@ -141,7 +141,7 @@ public: // FIXME: "Plugins" and "ConfigPlugins" should become "Modules" and "ConfigModules" enum KvircSubdir { - None, Pics, Config , + None, Pics, Config, Help, HelpEN, HelpNoIntl, Log, Incoming, Audio, Scripts, Plugins, ConfigPlugins, diff --git a/src/kvirc/kernel/kvi_app_fs.cpp b/src/kvirc/kernel/kvi_app_fs.cpp index f9dc6f445..3d40e19f8 100644 --- a/src/kvirc/kernel/kvi_app_fs.cpp +++ b/src/kvirc/kernel/kvi_app_fs.cpp @@ -328,8 +328,8 @@ bool KviApp::findImageInImageSearchPath(QString &szRetPath,const QString &filena return false; } -static KviApp::KvircSubdir pics_localsubdirs[2]={ KviApp::Pics , KviApp::Avatars }; -static KviApp::KvircSubdir pics_globalsubdirs[2]={ KviApp::Pics , KviApp::Avatars }; +static KviApp::KvircSubdir pics_localsubdirs[2]={ KviApp::Pics, KviApp::Avatars }; +static KviApp::KvircSubdir pics_globalsubdirs[2]={ KviApp::Pics, KviApp::Avatars }; /*bool KviApp::mapImageFile(KviStr &szRetPath,const char * filename) { diff --git a/src/kvirc/kernel/kvi_app_setup.cpp b/src/kvirc/kernel/kvi_app_setup.cpp index cb7e478a9..bec2dbc9b 100644 --- a/src/kvirc/kernel/kvi_app_setup.cpp +++ b/src/kvirc/kernel/kvi_app_setup.cpp @@ -65,7 +65,7 @@ static QLibrary * g_pSetupLibrary = 0; // Things launched at startup: // - Attempt to find the global Kvirc directory // - Attempt to find the local Kvirc directory -// and if it is not found , ask the user to choose one +// and if it is not found, ask the user to choose one // bool KviApp::checkGlobalKvircDirectory(const QString szDir) @@ -632,7 +632,7 @@ void KviApp::findGlobalKvircDirectory() // FAILED ? Check the usual way... #endif //COMPILE_WITH_KDE */ - // Non KDE compilation , or not found under $KDEDIR/share/apps/kvirc/$VERSION_BRANCH + // Non KDE compilation, or not found under $KDEDIR/share/apps/kvirc/$VERSION_BRANCH // Check for MacOS X Bundle compilation #ifdef COMPILE_ON_MAC @@ -657,7 +657,7 @@ void KviApp::findGlobalKvircDirectory() } } - //Last resource , try $HOME and $HOME/.kde + //Last resource, try $HOME and $HOME/.kde for(int k=0;usualKvircGlobalDir[k] != 0;k++){ m_szGlobalKvircDir = QDir::homePath(); m_szGlobalKvircDir+= usualKvircGlobalDir[k]; @@ -727,7 +727,7 @@ bool KviApp::findLocalKvircDirectory() if(uSourcesDate < KVI_SOURCES_DATE_NUMERIC_FORCE_SETUP) return false; // we force a setup anyway - // If we have it , ok...done + // If we have it, ok...done if(checkLocalKvircDirectory()) return true; } @@ -759,7 +759,7 @@ bool KviApp::findLocalKvircDirectory() szF += KVI_HOME_CONFIG_FILE_NAME; } - //If the file exists , read the first non empty line. + //If the file exists, read the first non empty line. KviConfig cfgx(szF,KviConfig::Read); cfgx.setGroup("Main"); @@ -769,7 +769,7 @@ bool KviApp::findLocalKvircDirectory() if(uSourcesDate < KVI_SOURCES_DATE_NUMERIC_FORCE_SETUP) return false; // we force a setup anyway - // If we have it , ok...done + // If we have it, ok...done return checkLocalKvircDirectory(); } diff --git a/src/kvirc/kernel/kvi_filetransfer.h b/src/kvirc/kernel/kvi_filetransfer.h index 685e3d5f8..4b88391be 100644 --- a/src/kvirc/kernel/kvi_filetransfer.h +++ b/src/kvirc/kernel/kvi_filetransfer.h @@ -94,7 +94,7 @@ public: KviFileTransferManager * manager(){ return KviFileTransferManager::instance(); }; // this returns the pointer to the transfer window : may be 0! KviWindow * transferWindow(){ return manager()->transferWindow(); }; - // this returns transferWindow() if not 0 , otherwise the application's active window + // this returns transferWindow() if not 0, otherwise the application's active window KviWindow * outputWindow(); // this may be called by the transfers to update the display when the state changes diff --git a/src/kvirc/kernel/kvi_iconmanager.cpp b/src/kvirc/kernel/kvi_iconmanager.cpp index 21b4cc797..596bffc61 100644 --- a/src/kvirc/kernel/kvi_iconmanager.cpp +++ b/src/kvirc/kernel/kvi_iconmanager.cpp @@ -620,7 +620,7 @@ void KviIconManager::iconWidgetClosed() In this last case KVIrc will look for the file in a predefined set of directories: First in the local "pics" directory (usually in ~/kvirc-version/pics/), then in the local "incoming" directory, - then in the global "pics" directory , then in the user home (~) + then in the global "pics" directory, then in the user home (~) and in the current directory.[br] */ diff --git a/src/kvirc/kernel/kvi_internalcmd.cpp b/src/kvirc/kernel/kvi_internalcmd.cpp index 30ebdd3ce..c66e9624f 100644 --- a/src/kvirc/kernel/kvi_internalcmd.cpp +++ b/src/kvirc/kernel/kvi_internalcmd.cpp @@ -49,7 +49,7 @@ static const char * internalCommandTable[KVI_NUM_INTERNAL_COMMANDS]= "dirbrowser.open", "ident.start", "ident.stop", - "tip.open" , + "tip.open", "openurl http://www.kvirc.net", "list.open", "if($option(boolShowChannelsJoinDialogAsToplevel))channelsjoin.open -t;else channelsjoin.open", diff --git a/src/kvirc/kernel/kvi_ircconnection.cpp b/src/kvirc/kernel/kvi_ircconnection.cpp index 5b61ed753..fb9e95ab0 100644 --- a/src/kvirc/kernel/kvi_ircconnection.cpp +++ b/src/kvirc/kernel/kvi_ircconnection.cpp @@ -735,7 +735,7 @@ void KviIrcConnection::resurrectDeadQueries() // 01234567890123456789012345678901234567890123456789 // 0123456789\r\n // -// We keep a list of data to send , and flush it as soon as we can. +// We keep a list of data to send, and flush it as soon as we can. // bool KviIrcConnection::sendFmtData(const char * pcFmt, ...) @@ -831,7 +831,7 @@ void KviIrcConnection::delayedStartNotifyList() // This delay is large enough to fire after the MOTD has been sent, // even on the weirdest network. // If there is no MOTD, this timer will fire after 15 secs, - // If there is a MOTD , restartNotifyList() will be triggered by RPL_ENDOFMOTD and + // If there is a MOTD, restartNotifyList() will be triggered by RPL_ENDOFMOTD and // will kill the timer before it has fired. } @@ -1630,7 +1630,7 @@ void KviIrcConnection::loginComplete(const QString & szNickName) void KviIrcConnection::incomingMessage(const char * pcMessage) { // A message has arrived from the current server - // First of all , notify the monitors + // First of all, notify the monitors if(KviPointerList<KviIrcDataStreamMonitor> * l = context()->monitorList()) { for(KviIrcDataStreamMonitor * m = l->first(); m; m = l->next()) diff --git a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp index b9ca8937b..65a9adf86 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp +++ b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp @@ -513,7 +513,7 @@ void KviIrcConnectionTargetResolver::haveServerIp() { if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIPv6ConnectionBindAddress),bindAddress)) { - // if it is not an interface name , kill it for now and let the user correct the address + // if it is not an interface name, kill it for now and let the user correct the address if(KVI_OPTION_STRING(KviOption_stringIPv6ConnectionBindAddress).indexOf(':') != -1) { if(!_OUTPUT_MUTE) @@ -542,7 +542,7 @@ void KviIrcConnectionTargetResolver::haveServerIp() { if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIPv4ConnectionBindAddress),bindAddress)) { - // if it is not an interface name , kill it for now and let the user correct the address + // if it is not an interface name, kill it for now and let the user correct the address if(KVI_OPTION_STRING(KviOption_stringIPv4ConnectionBindAddress).indexOf(':') != -1) { if(!_OUTPUT_MUTE) diff --git a/src/kvirc/kernel/kvi_irccontext.cpp b/src/kvirc/kernel/kvi_irccontext.cpp index fe471a9b8..e4b5e9ac4 100644 --- a/src/kvirc/kernel/kvi_irccontext.cpp +++ b/src/kvirc/kernel/kvi_irccontext.cpp @@ -461,7 +461,7 @@ void KviIrcContext::connectToCurrentServer() } } else { // !m_pAsynchronousConnectionData->szServer.isEmpty() - // ok , have a server to look for in the db + // ok, have a server to look for in the db // FIXME: this is a bit ugly... could it be managed in some completly different and nicer way ? KviServerDefinition d; d.szServer = m_pAsynchronousConnectionData->szServer; diff --git a/src/kvirc/kernel/kvi_irclink.cpp b/src/kvirc/kernel/kvi_irclink.cpp index ab0ed4704..63e804df1 100644 --- a/src/kvirc/kernel/kvi_irclink.cpp +++ b/src/kvirc/kernel/kvi_irclink.cpp @@ -291,7 +291,7 @@ void KviIrcLink::processData(char * buffer, int iLen) //now *p == '\0' //beginOfCurData points to '\0' if we have - //no more stuff to parse , or points to something + //no more stuff to parse, or points to something //different than '\r' or '\n'... if(*cBeginOfCurData) { diff --git a/src/kvirc/kernel/kvi_ircsocket.cpp b/src/kvirc/kernel/kvi_ircsocket.cpp index 0dee2af29..1c2566a03 100644 --- a/src/kvirc/kernel/kvi_ircsocket.cpp +++ b/src/kvirc/kernel/kvi_ircsocket.cpp @@ -96,7 +96,7 @@ KviIrcSocket::KviIrcSocket(KviIrcLink * pLink) m_tAntiFloodLastMessageTime.tv_usec = 0; if(KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) < 100) - KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) = 100; // this is our minimum , we don't want to lag the app + KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) = 100; // this is our minimum, we don't want to lag the app m_bInProcessData = false; @@ -1352,7 +1352,7 @@ void KviIrcSocket::doSSLHandshake(int) // Declare problems :) raiseError((iErr ? KviError::translateSystemError(iErr) : KviError_unknownError)); } else { - // can recover ? (EAGAIN , EINTR ?) + // can recover ? (EAGAIN, EINTR ?) m_pWsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write); QObject::connect(m_pWsn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); m_pWsn->setEnabled(true); @@ -1579,7 +1579,7 @@ void KviIrcSocket::processData(char * buffer,int) //now *p == '\0' //beginOfCurData points to '\0' if we have - //no more stuff to parse , or points to something + //no more stuff to parse, or points to something //different than '\r' or '\n'... if(*beginOfCurData) { @@ -1702,7 +1702,7 @@ void KviIrcSocket::queue_removeAllMessages() void KviIrcSocket::flushSendQueue() { - // If we're called from the flush timer , stop it + // If we're called from the flush timer, stop it if(m_pFlushTimer->isActive()) m_pFlushTimer->stop(); diff --git a/src/kvirc/kernel/kvi_lagmeter.cpp b/src/kvirc/kernel/kvi_lagmeter.cpp index f7b7f8e4e..70577480a 100644 --- a/src/kvirc/kernel/kvi_lagmeter.cpp +++ b/src/kvirc/kernel/kvi_lagmeter.cpp @@ -96,19 +96,19 @@ void KviLagMeter::timerEvent(QTimerEvent *) { KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagAlarmTimeUp, m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); - if(bDeletionSignal)return; // killed , probably by a quit -f -u + if(bDeletionSignal)return; // killed, probably by a quit -f -u m_bOnAlarm = true; } else if(m_bOnAlarm) { KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagAlarmTimeDown, m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); - if(bDeletionSignal)return; // killed , probably by a quit -f -u + if(bDeletionSignal)return; // killed, probably by a quit -f -u m_bOnAlarm = false; } KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagCheck, m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); - if(bDeletionSignal)return; // killed , probably by a quit -f -u + if(bDeletionSignal)return; // killed, probably by a quit -f -u m_pDeletionSignal = 0; } diff --git a/src/kvirc/kernel/kvi_notifylist.cpp b/src/kvirc/kernel/kvi_notifylist.cpp index 08b30099b..cfa749f1f 100644 --- a/src/kvirc/kernel/kvi_notifylist.cpp +++ b/src/kvirc/kernel/kvi_notifylist.cpp @@ -80,7 +80,7 @@ In this way, once in a while, KVIrc will send to the server an ISON message with the nickname Pragma. If Szymon is online, you will be notified with a message:[br] "Pragma [someuser@somehost.it] is on IRC".[br] - If Szymon uses often "[Pragma]" as his secondary nickname , you can do the following:[br] + If Szymon uses often "[Pragma]" as his secondary nickname, you can do the following:[br] [example] [cmd:reguser.addmask]reguser.addmask[/cmd] Szymon [Pragma]*@*.it [cmd:reguser.setproperty]reguser.setproperty[/cmd] Szymon notify "Pragma [Pragma]" @@ -103,7 +103,7 @@ in the notify list, it might become slow and eventually cause a client to server flood.[br] So finally, the intelligent method is the default. If you have "flood" problems, - or if you think that the notify list is quite slow , try the "stupid" method: + or if you think that the notify list is quite slow, try the "stupid" method: it is not that bad after all.[br] The third notify list management method is the "WATCH method".[br] It uses a totally different (and better) approach to the notify lists management, @@ -328,7 +328,7 @@ void KviNotifyListManager::notifyOffLine(const QString &nick,const QString &user KviIsOnNotifyListManager::KviIsOnNotifyListManager(KviIrcConnection * pConnection) : KviNotifyListManager(pConnection) { - m_pRegUserDict = new KviPointerHashTable<QString,QString>(17,false); // case insensitive , copy keys + m_pRegUserDict = new KviPointerHashTable<QString,QString>(17,false); // case insensitive, copy keys m_pRegUserDict->setAutoDelete(true); m_pNotifyList = new KviPointerList<QString>; m_pNotifyList->setAutoDelete(true); @@ -551,7 +551,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) } } - // Ok...looks to be my ison (still not sure at 100% , but can't do better) + // Ok...looks to be my ison (still not sure at 100%, but can't do better) if(m_pConnection->lagMeter()) m_pConnection->lagMeter()->lagCheckComplete("@notify_ison"); @@ -562,7 +562,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) m_pIsOnList->setAutoDelete(false); // Ok...we have an IsOn reply here - // The nicks in the IsOnList that are also in the reply are online , and go to the OnlineList + // The nicks in the IsOnList that are also in the reply are online, and go to the OnlineList // the remaining in the IsOnList are offline QString * s; @@ -574,8 +574,8 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) } m_pIsOnList->setAutoDelete(true); - // Ok...all the users that are online , are on the OnlineList - // the remaining users are in the m_pIsOnList , and are no longer online + // Ok...all the users that are online, are on the OnlineList + // the remaining users are in the m_pIsOnList, and are no longer online // first the easy step: remove the users that have just left irc or have never been online // we're clearling the m_pIsOnList @@ -612,8 +612,8 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) // check if he is on some channels if(ent->globalData()->nRefs() > 1) { - // mmmh...we have more than one ref , so the user is at least in one query or channel - // look him up on channels , if we find his entry , we can be sure that he is + // mmmh...we have more than one ref, so the user is at least in one query or channel + // look him up on channels, if we find his entry, we can be sure that he is // still the right user KviPointerList<KviChannel> * chlist = m_pConsole->connection()->channelList(); for(KviChannel * ch = chlist->first();ch;ch = chlist->next()) @@ -684,13 +684,13 @@ bool KviIsOnNotifyListManager::doMatchUser(const QString ¬ifyString,const Kvi if(!(m_pConsole->notifyListView()->findEntry(mask.nick()))) { notifyOnLine(mask.nick(),mask.user(),mask.host()); - } // else already online , and matching...all ok + } // else already online, and matching...all ok } else { // not matched.... has he been online before ? if(m_pConsole->notifyListView()->findEntry(mask.nick())) { - // has been online just a sec ago , but now the mask does not match - // either reguserdb has changed , or the user went offline and another one got his nick + // has been online just a sec ago, but now the mask does not match + // either reguserdb has changed, or the user went offline and another one got his nick // in the meantime... (ugly situation anyway) notifyOffLine(mask.nick(),mask.user(),mask.host(),__tr2qs("registration mask changed, or nickname is being used by someone else")); } else { @@ -853,7 +853,7 @@ bool KviIsOnNotifyListManager::handleUserhost(KviIrcMessage *msg) } } - // Ok...looks to be my usershot (still not sure at 100% , but can't do better) + // Ok...looks to be my usershot (still not sure at 100%, but can't do better) if(m_pConnection->lagMeter()) m_pConnection->lagMeter()->lagCheckComplete("@notify_userhost"); @@ -1178,7 +1178,7 @@ bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const QString &n { notifyOnLine(mask.nick(),mask.user(),mask.host(),"watch"); } else { - // else already online , and matching...all ok + // else already online, and matching...all ok if(msg->numeric() == RPL_NOWON) { // This is a reply to a /watch +something (should not happen, unless the user is messing) or to /watch l (user requested) @@ -1194,7 +1194,7 @@ bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const QString &n // not matched.... has he been online before ? if(m_pConsole->notifyListView()->findEntry(mask.nick())) { - // has been online just a sec ago , but now the mask does not match + // has been online just a sec ago, but now the mask does not match // prolly the reguserdb has been changed notifyOffLine(mask.nick(),mask.user(),mask.host(), __tr2qs("registration mask changed or desync with the watch service")); diff --git a/src/kvirc/kernel/kvi_options.cpp b/src/kvirc/kernel/kvi_options.cpp index ec5334a68..351ed4dba 100644 --- a/src/kvirc/kernel/kvi_options.cpp +++ b/src/kvirc/kernel/kvi_options.cpp @@ -61,7 +61,7 @@ extern KVIRC_API int g_iIdentDaemonRunningUsers; -#define RECT_OPTION(_txt,_val,_flags) KviRectOption(KVI_RECT_OPTIONS_PREFIX _txt, _val , _flags) +#define RECT_OPTION(_txt,_val,_flags) KviRectOption(KVI_RECT_OPTIONS_PREFIX _txt, _val, _flags) KviRectOption g_rectOptionsTable[KVI_NUM_RECT_OPTIONS]= { @@ -546,7 +546,7 @@ KviColorOption g_iccolorOptionsTable[KVI_NUM_ICCOLOR_OPTIONS]= #define PIXMAP_OPTION(_name,_flags) \ KviPixmapOption( \ - KVI_PIXMAP_OPTIONS_PREFIX _name , \ + KVI_PIXMAP_OPTIONS_PREFIX _name, \ KviPixmap(), \ _flags | KviOption_resetUpdateGui) @@ -566,8 +566,8 @@ KviPixmapOption g_pixmapOptionsTable[KVI_NUM_PIXMAP_OPTIONS]= //#define INT_OPTION(_name,_value,_flags) // { -// KVI_INT_OPTIONS_PREFIX _name , -// _value , +// KVI_INT_OPTIONS_PREFIX _name, +// _value, // _flags // } // @@ -580,8 +580,8 @@ KviPixmapOption g_pixmapOptionsTable[KVI_NUM_PIXMAP_OPTIONS]= #define UINT_OPTION(_name,_value,_flags) \ KviUIntOption( \ - KVI_UINT_OPTIONS_PREFIX _name , \ - _value , \ + KVI_UINT_OPTIONS_PREFIX _name, \ + _value, \ _flags \ ) @@ -670,8 +670,8 @@ KviUIntOption g_uintOptionsTable[KVI_NUM_UINT_OPTIONS]= #define FONT_OPTION(_name,_face,_size,_flags) \ KviFontOption( \ - KVI_FONT_OPTIONS_PREFIX _name , \ - QFont(_face,_size) , \ + KVI_FONT_OPTIONS_PREFIX _name, \ + QFont(_face,_size), \ _flags | KviOption_groupTheme \ ) @@ -704,14 +704,14 @@ KviFontOption g_fontOptionsTable[KVI_NUM_FONT_OPTIONS]= #define MSGTYPE_OPTION(_name,_text,_icon,_levl) \ KviMsgTypeOption( \ - KVI_MSGTYPE_OPTIONS_PREFIX _name , \ + KVI_MSGTYPE_OPTIONS_PREFIX _name, \ KviMsgType(_text,_icon,KVI_BLACK,KVI_TRANSPARENT,true,_levl), \ KviOption_sectFlagMsgType | KviOption_groupTheme \ ) #define MSGTYPE_OPTION_SPEC(_name,_text,_icon,_fore,_back,_levl) \ KviMsgTypeOption( \ - KVI_MSGTYPE_OPTIONS_PREFIX _name , \ + KVI_MSGTYPE_OPTIONS_PREFIX _name, \ KviMsgType(_text,_icon,_fore,_back,true,_levl), \ KviOption_sectFlagMsgType | KviOption_groupTheme \ ) diff --git a/src/kvirc/kernel/kvi_options.h b/src/kvirc/kernel/kvi_options.h index b5eecabf2..57cd3cf84 100644 --- a/src/kvirc/kernel/kvi_options.h +++ b/src/kvirc/kernel/kvi_options.h @@ -48,7 +48,7 @@ int flags; \ public: \ _cname(const QString &n,_type o,int f) \ - : name(n) , option(o) , flags(f) {}; \ + : name(n), option(o), flags(f) {}; \ ~_cname() {}; \ }; diff --git a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp index 84aa829c2..41fa90a76 100644 --- a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp +++ b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp @@ -324,11 +324,11 @@ namespace KviKvsCoreCallbackCommands $8 = server that provided the information[br] $9 = away message (empty if user hasn't set an away message)[br] $10 = magic string evaluated at awhois call (may be empty)[br] - If the -i switch is specified , the whois message is sent to the server + If the -i switch is specified, the whois message is sent to the server that the <nickname> user is connected to; in this way you will probably get the idle time of the user too.[br] If the server replies with a "No such nick/channel error message" the - <callback command> will be still triggered , but will have all the parameters + <callback command> will be still triggered, but will have all the parameters empty with the exception of $0.[br] If the connection gets interrupted before all the information have been received, the <callback command> will never be triggered.[br] @@ -397,9 +397,9 @@ namespace KviKvsCoreCallbackCommands The <callback_code> will be executed as reaction to a button press.[br] [br] The "window" type button can be added only to the windows that have a button container: this - actually includes at least console , channels and queries.[br] + actually includes at least console, channels and queries.[br] The button is added to the current window; if you want to add it to a different - window , use the [doc:command_rebinding]standard -r command rebinding[/doc] switch.[br] + window, use the [doc:command_rebinding]standard -r command rebinding[/doc] switch.[br] The <callback_code> will be executed as reaction to a button press; the code execution will be bound to the window that the button is attacched to.[br] If a button with <name> already exists in the current window, its parameters are changed @@ -408,7 +408,7 @@ namespace KviKvsCoreCallbackCommands Passing an empty <callback_value> removes the button.[br] The callback parameters $0 and $1 will contain the screen coordinates of the bottom-left corner of the button: this is useful for showing a popup menu in response to the click.[br] - If the -q switch is used , this command prints no warnings.[br] + If the -q switch is used, this command prints no warnings.[br] The -d switch causes the button to be disabled (grayed).[br] @examples: [example] @@ -1085,7 +1085,7 @@ namespace KviKvsCoreCallbackCommands %parameter = "some string value" echo "Before calling /timer \%parameter is \"%parameter\"" timer -s (test,1000,%parameter){ echo "inside the callback \%parameter is \"%parameter\" but \$0 is \"$0\""; } - [comment]# watch the timer running , and note the behaviour of the %parameter variable[/comment] + [comment]# watch the timer running, and note the behaviour of the %parameter variable[/comment] killtimer test [comment]# Use the extended scope timer variables[/comment] timer(test,1000) diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp index 531d75b19..2c97f809d 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp @@ -627,7 +627,7 @@ namespace KviKvsCoreFunctions <boolean> $isSet(<data:variant>) @description: Returns 1 if <data> is actually set to some non-empty value - and 0 otherwise. If <data> is a variable , then this function + and 0 otherwise. If <data> is a variable, then this function simply checks if the variable is set. If <data> is a constant then this function checks if the constant is non empty. Since KVIrc treats empty strings as "unset" values then diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp index 51e572e7c..fb21a7dc7 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp @@ -1137,7 +1137,7 @@ namespace KviKvsCoreFunctions has the specified <caption text>.[br] If no window matches the specified <caption text>, and invalid window id is returned (0).[br] - If no <caption text> is specified , this function returns the id + If no <caption text> is specified, this function returns the id of the current window.[br] <context_id> restricts search in only one irc context. @examples: diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp index fa3e676cf..91490d7cf 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp @@ -285,7 +285,7 @@ namespace KviKvsCoreSimpleCommands @description: Beeps (when possible :D)[br] ...[br] - No , really...[br] + No, really...[br] This command rings the bell on the keyboard (the PC speaker). The volume must be in range 0-100; the default is 100.[br] The pitch is specified in Hz and must be positive.[br] @@ -644,7 +644,7 @@ namespace KviKvsCoreSimpleCommands Sends a CTCP message @description: Sends a CTCP message to the specified <target>.[br] - The target may be a nickname , a channel, or a comma separated list of nicknames.[br] + The target may be a nickname, a channel, or a comma separated list of nicknames.[br] The <ctcp_data> is a string containing the ctcp type followed by the ctcp parameters.[br] For more info take a look at the [doc:ctcp_handling]ctcp protocol implementation notes[/doc].[br] The CTCP message will be a request (sent through a PRIVMSG) unless the -n switch @@ -1105,12 +1105,12 @@ namespace KviKvsCoreSimpleCommands Send the output to the debug window (takes precedence over -w) @description: Outputs the <text> to the current window.[br] - If the 'w' switch is present , outputs the <text> + If the 'w' switch is present, outputs the <text> to the specified window instead of the current one. The <window_id> parameter is the [doc:window_naming_conventions]global ID[/doc] of the window that has to be used.[br] - If the 'i' switch is given , it uses the specified - icon scheme (icon and colors) , otherwise it uses + If the 'i' switch is given, it uses the specified + icon scheme (icon and colors), otherwise it uses the default one (0).[br] If the -d switch is used then the output is sent to a special window called "Debug" (the window is created if not existing yet). @@ -1222,8 +1222,8 @@ namespace KviKvsCoreSimpleCommands [doc:command_rebinding]-r rebinding switch[/doc]: -w causes the specified window to be used only for output, but the command parameters are evaluated in the current window.[br] - If the 'i' switch is given , it uses the specified - icon scheme (icon and colors) , otherwise it uses + If the 'i' switch is given, it uses the specified + icon scheme (icon and colors), otherwise it uses the default one (0).[br] If the -n switch is present then the highlighting rules are not applied.[br] diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp index 0532c71bd..71b4b61a8 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp @@ -82,7 +82,7 @@ namespace KviKvsCoreSimpleCommands set the return value (use [cmd]setreturn[/cmd] for that) and in the event handlers this command may have additional semantics: refer to the specific event documentation for more info.[br] - In fact , this command should be used [b]only[/b] in the event handlers, + In fact, this command should be used [b]only[/b] in the event handlers, use [cmd]return[/cmd] in any other context.[br] */ @@ -111,7 +111,7 @@ namespace KviKvsCoreSimpleCommands Finds the first available help browser in the current frame then opens the specified [document]. If no [document] is specified it the documentation index is shown. - If no help browser is available , a new one is created. + If no help browser is available, a new one is created. [document] can be an absolute path or a relative one: in this case the document is searched in the KVIrc documentation directory.[br] If no document has been found using absolute and relative paths, diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp index 49aeb760e..6b4b31899 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp @@ -465,7 +465,7 @@ namespace KviKvsCoreSimpleCommands [b]Color[/b]: <optValue> must have the format #RRGGBB where R G and B are hex digits[br] [b]Font[/b]: <optValue> is a comma separated list of font properties: <family>,<pointsize>,<style>,<charset>,<weight>,<flags>. <family> is the font face name - ("arial" , "helvetica" etc..), <pointsize> is more or less the indicator of the size of the font + ("arial", "helvetica" etc..), <pointsize> is more or less the indicator of the size of the font (try sth like 12,14), <style> is an integer that indicates the font style (fixed for example), <charset> is an integer that indicates the charset of the font (maybe one day I'll document it better), <weight> indicates the (ehm) weight of the font (50,100,150...matches Bold,DemiBold etc..), @@ -734,7 +734,7 @@ namespace KviKvsCoreSimpleCommands QByteArray szText; if(sl.count() == 1) { - // single chan , use channel encoding if possible + // single chan, use channel encoding if possible KviChannel * ch = KVSCSC_pConnection->findChannel(szChans); if(ch) szText = ch->encodeText(szMsg); @@ -775,7 +775,7 @@ namespace KviKvsCoreSimpleCommands @short: Sends a password to the server @description: - Sends a password to the server: usually KVIrc takes care of it , but well.. this is useful with bouncers.[br] + Sends a password to the server: usually KVIrc takes care of it, but well.. this is useful with bouncers.[br] This command is a [doc:rfc2821wrappers]RFC2821 command wrapper[/doc]; see that document for more information.[br] */ // RFC2821 wrapper @@ -841,7 +841,7 @@ namespace KviKvsCoreSimpleCommands handlers for <popup_name>. In other words, you can't "popup a popup" while it is being popped up. :) (This would be an endless recursive behaviour).[br] - If the -p switch is used , then <screen_coordinates> must be + If the -p switch is used, then <screen_coordinates> must be in the form <x>,<y> and will be used as screen coordinates for the placement of the popup (instead of the current cursor position).[br] @seealso: @@ -992,7 +992,7 @@ namespace KviKvsCoreSimpleCommands [example] [comment]# Open a single query to Pragma[/comment] query Pragma - [comment]# Open a query to Pragma and to Crocodile , say "Hello!" in both windows[/comment] + [comment]# Open a query to Pragma and to Crocodile, say "Hello!" in both windows[/comment] query Pragma,Crocodile Hello ! [/example] */ @@ -1077,7 +1077,7 @@ namespace KviKvsCoreSimpleCommands channels and queries kept open etc..). The QUIT message will be still sent unless the -f switch is used. You can control all the "unexpected disconnection" options in the options dialog. - If the -q switch is specified , this command terminates KVIrc immediately.[br] + If the -q switch is specified, this command terminates KVIrc immediately.[br] @examples: [example] quit Time to sleep diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp index 3c1da797a..d9148c49b 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp @@ -236,7 +236,7 @@ namespace KviKvsCoreSimpleCommands } if(!console) { - // yep , have to search + // yep, have to search console = KVSCSC_pWindow->frame()->firstNotConnectedConsole(); if(!console) { @@ -346,12 +346,12 @@ namespace KviKvsCoreSimpleCommands it is removed first.[br] <visible_text> can optionally contain the "&" character to identify the popup menu accelerator.[br] - [menu_name] , if given , must be avalid name of a popup menu created earlier + [menu_name], if given, must be avalid name of a popup menu created earlier with [cmd]defpopup[/cmd] (or the script center).[br] - If [menu_name] is not given , the popup menu identified by <visible_text> is removed.[br] - If the -i switch is used , <index> is a [b]zero based index[/b] of the default + If [menu_name] is not given, the popup menu identified by <visible_text> is removed.[br] + If the -i switch is used, <index> is a [b]zero based index[/b] of the default menu-bar text item: the new popup menu will be placed on the left of that default item.[br] - If -q is used , this command prints no warnings (so you can safely use it to remove + If -q is used, this command prints no warnings (so you can safely use it to remove popup menus without being sure that they actually are in there). The warning itself serves to debugging purposes for the scripter.[br] @seealso: diff --git a/src/kvirc/kvs/kvi_kvs_eventhandler.h b/src/kvirc/kvs/kvi_kvs_eventhandler.h index ba367cdc4..56b3067cd 100644 --- a/src/kvirc/kvs/kvi_kvs_eventhandler.h +++ b/src/kvirc/kvs/kvi_kvs_eventhandler.h @@ -33,7 +33,7 @@ class KVIRC_API KviKvsEventHandler : public KviHeapObject { public: - enum Type { Script , Module }; + enum Type { Script, Module }; protected: Type m_type; public: diff --git a/src/kvirc/kvs/kvi_kvs_eventmanager.cpp b/src/kvirc/kvs/kvi_kvs_eventmanager.cpp index 794a2cb3c..91ee0fe58 100644 --- a/src/kvirc/kvs/kvi_kvs_eventmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_eventmanager.cpp @@ -50,7 +50,7 @@ Event handlers can be created or destroyed by using the scriptcenter (graphic interface) or even from the commandline (or script) by using the [cmd]event[/cmd] command.[br] For example, the [event:onirc]OnIRC[/event] is triggered when the login operations have - been terminated and you can consider yourself "completely" on IRC. For example , you might + been terminated and you can consider yourself "completely" on IRC. For example, you might want to "auto-join" some channels. Nothing easier! The following snippet of code adds a handler to the OnIRC event that joins three channels:[br] [example] @@ -73,7 +73,7 @@ } [/example] (An even nicer idea would be to use the [cmd]awhois[/cmd] command...but that's left to the reader as exercise.[br] - To remove an event handler you still use the [cmd]event[/cmd] command , but with an empty code block:[br] + To remove an event handler you still use the [cmd]event[/cmd] command, but with an empty code block:[br] [example] [cmd]event[/cmd](OnIRC,lookforfred){}[br] [/example] diff --git a/src/kvirc/kvs/kvi_kvs_eventtable.cpp b/src/kvirc/kvs/kvi_kvs_eventtable.cpp index 4710edd57..319270a55 100644 --- a/src/kvirc/kvs/kvi_kvs_eventtable.cpp +++ b/src/kvirc/kvs/kvi_kvs_eventtable.cpp @@ -231,7 +231,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= F2 to F12, F1 to F12 with SHIFT key pressed, 0 to 9 with CTRL key pressed.[br] This means that you can set up 33 "quick" aliases...that's really more than an user can remember.[br] - If you need more keys , mail me , I'll see what I can do :)[br] + If you need more keys, mail me, I'll see what I can do :)[br] */ EVENT("OnAccelKeyPressed", \ "$0 = keys"), @@ -314,7 +314,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= is detected to be ON-Line.[br] The event is triggered in the console window or the active window of the IRC context depending on the user options.[br] - (Note: If you call [cmd]halt[/cmd] in this event , you will stop the "Nick is on irc" output, + (Note: If you call [cmd]halt[/cmd] in this event, you will stop the "Nick is on irc" output, but this is rather a bad idea since KVIrc gives a lot of additional information to the user with some notify-methods).[br] This is a good place to play a sound or attract the user attention in some other way.[br] @@ -340,7 +340,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= has just left IRC.[br] The event is triggered in the console window or the active window of the IRC context depending on the user options.[br] - (Note: If you call [cmd]halt[/cmd] in this event , you will stop the "Nick has left irc" output, + (Note: If you call [cmd]halt[/cmd] in this event, you will stop the "Nick has left irc" output, but this is rather a bad idea since KVIrc gives a lot of additional information to the user with some notify-methods).[br] This is a good place to play a sound or attract the user attention in some other way.[br] @@ -929,7 +929,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= the text view. The double click link action is builtin and it causes KVIrc to open the URL with a browser (tipically your OS default browser).[br] This is a good place to show a [cmd]popup[/cmd] menu with some operations - that can be performed with the URL , like bookmarking in some way or opening + that can be performed with the URL, like bookmarking in some way or opening with a specific browser.[br] */ EVENT("OnURLLinkPopupRequest", \ @@ -959,7 +959,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= the text view. The double click link action is builtin and it causes KVIrc to query the MOTD of the server.[br] This is a good place to show a [cmd]popup[/cmd] menu with some operations - that can be performed with the server name , like querying stats or links.[br] + that can be performed with the server name, like querying stats or links.[br] Please note that the server name is generally NOT a hostname: some parts of it are often hidden. The name of the server is generally valid only within the IRC network that you are connected to.[br] @@ -1020,7 +1020,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= This event is triggered when an user has right clicked on an "unknown" nickname link in the text view.[br] This is a good place to show a [cmd]popup[/cmd] menu with some operations - that can be performed with the nickname like querying , sending a file by dcc or opening a dcc.chat. + that can be performed with the nickname like querying, sending a file by dcc or opening a dcc.chat. Please note that NOT ALL the nickname links will receive this event.[br] The nickname links that appear in the text view of the channel that they are actually in are handled by the [event:onchannelnickpopuprequest]OnChannelNickPopupRequest[/event] event.[br] @@ -1080,7 +1080,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= or a single nickname (if it is a link).[br] In both cases all the nicknames are currently on the channel.[br] You should popup a popup-menu with a set of possible channel-related actions, - like op/deop , voice/devoice , whois etc... + like op/deop, voice/devoice, whois etc... @seealso: [event:onchannelnickdefaultactionrequest]OnChannelNickDefaultActionRequest[/event] */ @@ -1103,7 +1103,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= This event is triggered when an user has right clicked on a list of nicknames in the notify list (console window).[br] This is a good place to show a [cmd]popup[/cmd] with some actions that can be performed - on the nicknames like querying , performing a whois lookup or sth similar.[br] + on the nicknames like querying, performing a whois lookup or sth similar.[br] */ EVENT("OnNotifyListPopupRequest", \ "$0 = nickname list"), @@ -1532,7 +1532,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= Channel @description: Triggered when a NON-local user is leaving a channel.[br] - The PART message has already been processed by the server , so + The PART message has already been processed by the server, so the user is effectively no longer on the channel. On the other side, it might be useful to access the user-related channel data from this event, thus the handler is called effectively just BEFORE the @@ -1565,7 +1565,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= Channel @description: Triggered when the local user is leaving a channel.[br] - The PART message has already been processed by the server , so + The PART message has already been processed by the server, so the user is effectively no longer on the channel. On the other side, it might be useful to access the channel data from this event, thus the handler is called effectively just BEFORE the @@ -1599,7 +1599,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= Channel @description: Triggered when a non-local user is being kicked from a channel.[br] - The KICK message has already been processed by the server , so + The KICK message has already been processed by the server, so the user is effectively no longer on the channel. On the other side, it might be useful to access the user-related channel data from this event, thus the handler is called effectively just BEFORE the @@ -1634,7 +1634,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= Channel @description: Triggered when the local user has been kicked from a channel.[br] - The KICK message has already been processed by the server , so + The KICK message has already been processed by the server, so the user is effectively no longer on the channel. On the other side, it might be useful to access the user-related channel data from this event, thus the handler is called effectively just BEFORE the @@ -1703,7 +1703,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= Console @description: Triggered when an user is quitting IRC.[br] - The QUIT message has already been processed by the server , so + The QUIT message has already been processed by the server, so the user is effectively no longer on IRC. On the other side, it might be useful to access the user-related data from this event, thus the handler is called effectively just BEFORE the @@ -1770,7 +1770,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]= @description: Triggered when the local user has changed his user mode.[br] The first parameter is the changed mode flag with a leading '+' or '-' sign: - if the mode was removed it will be something like "-x" , otherwise something like "+x".[br] + if the mode was removed it will be something like "-x", otherwise something like "+x".[br] Calling 'halt' in this event will stop the "mode" message output.[br] */ EVENT("OnUserModeChange", \ diff --git a/src/kvirc/kvs/kvi_kvs_object.cpp b/src/kvirc/kvs/kvi_kvs_object.cpp index c63c6a454..c7b5ce998 100644 --- a/src/kvirc/kvs/kvi_kvs_object.cpp +++ b/src/kvirc/kvs/kvi_kvs_object.cpp @@ -957,7 +957,7 @@ int KviKvsObject::emitSignal(const QString &sigName,KviKvsObjectFunctionCall * p while(KviKvsObjectConnection * s = it.current()) { - // save it , since s may be destroyed in the call! + // save it, since s may be destroyed in the call! KviKvsObject * pTarget = s->pTargetObject; emitted++; @@ -1753,7 +1753,7 @@ bool KviKvsObject::callFunction( return h->call(this,&fc); // Not only gcc spits out compiler errors: - // 25.09.2001 , at this point in file + // 25.09.2001, at this point in file // c:\programmi\microsoft visual studio\myprojects\kvirc3\src\kvirc\uparser\kvi_scriptobject.cpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR // (compiler file 'E:\8168\vc98\p2\src\P2\main.c', line 494) diff --git a/src/kvirc/kvs/kvi_kvs_parser.cpp b/src/kvirc/kvs/kvi_kvs_parser.cpp index 569079265..3b14d5d24 100644 --- a/src/kvirc/kvs/kvi_kvs_parser.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser.cpp @@ -215,7 +215,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer // <command parameter list> ::= <command parameter>[<space><command parameter>] // <command parameter> ::= <command parameter part>[<command parameter>] // <command parameter part> ::= <command literal parameter> | <string parameter> | <data evaluation> -// <command literal parameter> ::= <anything except space , null , newline , ; , " , $ or %> +// <command literal parameter> ::= <anything except space, null, newline, ;, ", $ or %> // <string parameter> ::= '"'<string parameter body>'"' // <string parameter body> ::= <anything except '"' or null>... // <command terminator> ::= ';' | '\n' | '\0' @@ -427,7 +427,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [example] [cmd]join[/cmd] #kvirc kvircrocks [/example] - or , since #kvirc usually has no password , by writing: + or, since #kvirc usually has no password, by writing: [example] [cmd]join[/cmd] #kvirc [/example] @@ -565,7 +565,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer and then use /[cmd]parse[/cmd] <filename> [/note] In this case the command block has no special meaning - other than making the code more readable , but command blocks + other than making the code more readable, but command blocks will be useful later (see [cmd]if[/cmd],[cmd]while[/cmd]...).[br] [note] Unlike in C or C++, the braces do NOT automatically define a variable scope @@ -580,7 +580,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer A comment starts with the character '#' and terminates with a newline. You can start a comment anywhere a command can start.[br] [example] - # This is a comment , it occupies the whole line + # This is a comment, it occupies the whole line [cmd]echo[/cmd] After the comment!; # This is an end-line comment [/example] You can't escape newline characters in this case. @@ -663,7 +663,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [/example] The -w switch allows to redirect the echo text to a specified window --- in this case the one that you are typing in.[br] - [i](Surprise: in this case the -w switch is useless , + [i](Surprise: in this case the -w switch is useless, since echo prints text to the current window by default... but it will work correctly. :)[/i] [/p] @@ -709,7 +709,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [example] [cmd]echo[/cmd] The length of '(a+b)' is : [fnc]$str.len[/fnc]( (a+b) ) [/example] - This is useful for algebraic and boolean expressions , like the ones + This is useful for algebraic and boolean expressions, like the ones accepted by the special function $() (see next paragraphs).[br] [/p] @@ -793,10 +793,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer } [/example] The example above will first check the validity of the <nickname> passed to kb: - if no nickname was passed , it will warn the user and stop. + if no nickname was passed, it will warn the user and stop. The next step will be the "ban <nickname>" call. Another enchancement is the "default reason": we first assign the remaining parameters ($1- means "from $1 to the end") to a temporary variable, - if the variable is empty , a default kick reason is assigned. + if the variable is empty, a default kick reason is assigned. Finally the "kick <nickname> <reason>" will be executed. Get used to looking at the single command documentation pages, they will give you the hints necessary to fully understand the above piece of code. @@ -831,7 +831,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer ... [/example] Ops.. I've used some variables without actually explaining them... hehe.. please forgive me and read on. - This example is again really simple , but you might have complexier function-aliases. + This example is again really simple, but you might have complexier function-aliases. The function-aliases are also normal aliases.... you can use it as a command: [example] /sum3 1 2 3 @@ -840,10 +840,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer (just because a command call implies ignoring the return value. In fact there is no difference al all between function-aliases and normal-aliases: the caller makes the difference: by calling an alias as a command the return value - just disappears in hyperspace, by calling an alias as a function , the return value + just disappears in hyperspace, by calling an alias as a function, the return value is propagated (and in fact "used"). (There are some "nice" exceptions to this rule...but you don't need to care about it, for now). - If return is not called inside an alias body , the return value will be just a null value. + If return is not called inside an alias body, the return value will be just a null value. [/p] [p] Aliases can accept switches just like any other command. The [fnc]$sw[/fnc] is there @@ -856,7 +856,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer The functions of type [b]$N[-[M]][/b] (where N and M are positive numbers starting from 0 and N < M) evaluate to the sequence of [b]positional parameters[/b] from Nth to Mth."[br] - If M is omitted , the function evaluate to the sequence of [b]positional + If M is omitted, the function evaluate to the sequence of [b]positional parameters[/b] from Nth to the last one. If the whole -M block is omitted the function evaluate to the Nth positional parameter. We will discover more on the [b]positional parameters[/b] when talking @@ -1018,7 +1018,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer queries it is the list of the targets. For some other windows the logical name corresponds to the caption text. This will be discussed later.[br] The [b]type identifier[/b] describes the properties of a certain window. - For channel windows the type identifier is "channel" , for query windows is "query" , + For channel windows the type identifier is "channel", for query windows is "query", for console windows it is "console", etc..[br] [big]Irc contexts[/big][br] @@ -1098,7 +1098,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer You will obviously get an error message if you try to use them in a window that has no associated IRC connection.[br] For instance: [cmd]whois[/cmd] will work only if you execute it - in a console , channel or query window.[br] + in a console, channel or query window.[br] If you want to use these commands in a window that is not associated to any IRC context you may use the [doc:command_rebinding]standard -r switch[/doc]. You can use the same switch to execute a command in an [b]IRC context[/b] that is @@ -1195,10 +1195,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer } [/example] The example above will first check the validity of the <nickname> passed to kb: - if no nickname was passed , it will warn the user and stop. + if no nickname was passed, it will warn the user and stop. The next step will be the "ban <nickname>" call. Another enchancement is the "default reason": we first assign the remaining parameters ($1- means "from $1 to the end") to a temporary variable, - if the variable is empty , a default kick reason is assigned. + if the variable is empty, a default kick reason is assigned. Finally the "kick <nickname> <reason>" will be executed. Get used to looking at the single command documentation pages, they will give you the hints necessary to fully understand the above piece of code. @@ -1233,7 +1233,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer ... [/example] Ops.. I've used some variables without actually explaining them... hehe.. please forgive me and read on. - This example is again really simple , but you might have complexier function-aliases. + This example is again really simple, but you might have complexier function-aliases. The function-aliases are also normal aliases.... you can use it as a command: [example] /sum3 1 2 3 @@ -1242,10 +1242,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer (just because a command call implies ignoring the return value. In fact there is no difference al all between function-aliases and normal-aliases: the caller makes the difference: by calling an alias as a command the return value - just disappears in hyperspace, by calling an alias as a function , the return value + just disappears in hyperspace, by calling an alias as a function, the return value is propagated (and in fact "used"). (There are some "nice" exceptions to this rule...but you don't need to care about it, for now). - If return is not called inside an alias body , the return value will be just a null value. + If return is not called inside an alias body, the return value will be just a null value. [/p] [p] Aliases can accept switches just like any other command. The [fnc]$sw[/fnc] is there @@ -1598,7 +1598,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer Generic coding tips for scripters (and not only) @body: Here comes a small list of "coding tips".[br] - These apply to programming in general , not only to KVIrc scripting.[br] + These apply to programming in general, not only to KVIrc scripting.[br] [br] 1. [b]Comment your code[/b][br] A well commented code is easy to mantain, and easy to read by others.[br] @@ -1623,7 +1623,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer is getting large.[br] Obviously using "thisIsACounterVariable" as name for a simple counter is also a suicide.[br] - A good convention on variable names can speed up writing , debugging and mantaining code.[br] + A good convention on variable names can speed up writing, debugging and mantaining code.[br] Encoding the type of the variable in the variable name might be also a good idea, but this is a matter of taste; personally I feel really well with that.[br] Just as example, here go my fundamental convention rules for C++:[br] @@ -1773,7 +1773,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [/tr] [tr] [td]<alphanumeric char>[/td] - [td]Ascii characters 'A' to 'Z' , 'a' to 'z' , '0' to '9' and '_'[/td] + [td]Ascii characters 'A' to 'Z', 'a' to 'z', '0' to '9' and '_'[/td] [/tr] [tr] [td]<variable>[/td] @@ -2276,15 +2276,15 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [p] Beside local and global variables there is a third family of them. Variables that have a ':' character just after the leading '%' are [b]extended scope[/b] variables. - "%:index" , "%:Hello" , "%:something.else" are all valid special scope variable names. + "%:index", "%:Hello", "%:something.else" are all valid special scope variable names. They're actually used in popups and in timers (but later I might find other usages as well :). "Extended scope" means that these variables are somewhere in the middle between - global and local variables. They normally act as local , but in some cases their [b]lifetime[/b] and [b]visibility[/b] + global and local variables. They normally act as local, but in some cases their [b]lifetime[/b] and [b]visibility[/b] may be extended. [/p] [p] - For example , in the popups , all the special scope variables + For example, in the popups, all the special scope variables are visible during all the "lifetime" of a popup (so from the prologue code call to the moment when the user selects an item and the corresponding code is executed). This allows you to pre-calculate some data or conditions in the popup prologue diff --git a/src/kvirc/kvs/kvi_kvs_parser_command.cpp b/src/kvirc/kvs/kvi_kvs_parser_command.cpp index 2722f4dda..b75bf9f63 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_command.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_command.cpp @@ -163,7 +163,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() if(!cmd) { - // might be an error , but might be not... + // might be an error, but might be not... // it is an error only if error() returns true // but since the caller will take care of it // we just return 0 @@ -201,7 +201,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() cmd = (this->*(ccpr->proc))(); if(!cmd) { - // might be an error , but might be not... + // might be an error, but might be not... // it is an error only if error() returns true // but since the caller will take care of it // we just return 0 diff --git a/src/kvirc/kvs/kvi_kvs_parser_comment.cpp b/src/kvirc/kvs/kvi_kvs_parser_comment.cpp index 2f5dc354c..e2830d129 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_comment.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_comment.cpp @@ -49,7 +49,7 @@ KviKvsTreeNode * KviKvsParser::parseComment() case '*': { const QChar * pBegin = KVSP_curCharPointer; - // c style , multiline + // c style, multiline KVSP_skipChar; for(;;) { diff --git a/src/kvirc/kvs/kvi_kvs_parser_expression.cpp b/src/kvirc/kvs/kvi_kvs_parser_expression.cpp index 0eddc2a88..58da7d1b9 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_expression.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_expression.cpp @@ -505,7 +505,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpression(char terminator) return left; } - // not a terminator... must be an operator (or an error , eventually) + // not a terminator... must be an operator (or an error, eventually) KviKvsTreeNodeExpression * curTopOperator = parseExpressionBinaryOperator(); if(!curTopOperator) diff --git a/src/kvirc/kvs/kvi_kvs_parser_lside.cpp b/src/kvirc/kvs/kvi_kvs_parser_lside.cpp index b69c59e46..ad2f9096c 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_lside.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_lside.cpp @@ -39,7 +39,7 @@ @type: language @short: - Variable operators , assignments & co. + Variable operators, assignments & co. @body: Operator constructs are commands just like the other ones. All the operators work on local or global variables and dictionaries.[br] diff --git a/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp index bfc44610d..31465c6c9 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp @@ -142,7 +142,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandBreak() @description: Interrupts an iteration loop like [cmd]while[/cmd].[br] This command always jumps out of a single code block.[br] - If called outside an iteration loop , will act just like [cmd]halt[/cmd] + If called outside an iteration loop, will act just like [cmd]halt[/cmd] has been called but has no additional semantics for events.[br] */ const QChar * pBegin = KVSP_curCharPointer; // FIXME: this is not accurate at all : it may be even the end of the cmd @@ -697,7 +697,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandWhile() delete e; return 0; } - } // else , just an empty instruction + } // else, just an empty instruction return new KviKvsTreeNodeSpecialCommandWhile(pBegin,e,i); } @@ -890,7 +890,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandIf() delete e; return 0; } - } // else , just an empty instruction + } // else, just an empty instruction if(!skipSpacesAndNewlines()) { @@ -963,7 +963,7 @@ handle_else_instruction: if(i)delete i; return 0; } - } // else , just an empty instruction + } // else, just an empty instruction return new KviKvsTreeNodeSpecialCommandIf(pBegin,e,i,i2); } @@ -1180,9 +1180,9 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach() Iteration command @description: Executed <command> while assigning to <variable> each <item>.[br] - <item> may be a constant , a variable , an array , a dictionary or a function returning + <item> may be a constant, a variable, an array, a dictionary or a function returning either a constant string an array reference or a dictionary reference.[br] - If <item> is an array , a dictionary or a function that returns a dictionary or array reference + If <item> is an array, a dictionary or a function that returns a dictionary or array reference the iteration is done through all the dictionary/array items.[br] Please note that the iteration order of dictionary items is undefined.[br] You can always break from the loop by using the [cmd]break[/cmd] command.[br] @@ -1929,17 +1929,17 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDefpopup() the previous contents of the popups are cleared, otherwise are preserved.[br] The popup is generated 'on the fly' when the [cmd]popup[/cmd] command is called.[br] - The 'item' keyword adds a menu item with visible <text> , + The 'item' keyword adds a menu item with visible <text>, the optional <icon> and <command> as code to be executed when the item is clicked. <text> is a string that is evaluated at [cmd]popup[/cmd] call time and may contain identifiers and variables. If <expression> is given, it is evaluated at [cmd]popup[/cmd] call time and if the result is 0, the item is not shown in the physical popup.[br] - The 'popup' keyword adds a submenu with visible <text> , the optional + The 'popup' keyword adds a submenu with visible <text>, the optional <icon> and a popup body that follows exactly the same syntax as the defpopup body. The <expression> has the same meaning as with the 'item' keyword.[br] - The 'extpopup' keyword adds a submenu with visible <text> , the optional + The 'extpopup' keyword adds a submenu with visible <text>, the optional icon and a popup body that is defined by the popup menu <name>. This basically allows to nest popup menus and define their parts separately. <icon> and <expression> have the same meaning as with the 'item' keyword.[br] @@ -1955,7 +1955,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDefpopup() <id> is an unique identifier that can be used to remove single items by the means of [cmd]delpopupitem[/cmd]. If <id> is omitted then it is automatically generated. - Please note that using this command inside the prologue , epilogue + Please note that using this command inside the prologue, epilogue or item code of the modified popup menu is forbidden. In other words: self modification of popup menus is NOT allowed.[br] To remove a popup menu use this command with an empty body:[br] diff --git a/src/kvirc/kvs/kvi_kvs_popupmenu.h b/src/kvirc/kvs/kvi_kvs_popupmenu.h index 2f163c572..a49726185 100644 --- a/src/kvirc/kvs/kvi_kvs_popupmenu.h +++ b/src/kvirc/kvs/kvi_kvs_popupmenu.h @@ -68,7 +68,7 @@ class KVIRC_API KviKvsPopupMenuItem { friend class KviKvsPopupMenu; public: - enum Type { Item , Menu , Label , Separator , ExtMenu }; + enum Type { Item, Menu, Label, Separator, ExtMenu }; protected: KviKvsPopupMenuItem(Type t,const QString &szItemName,const QString &szCondition); KviKvsPopupMenuItem(Type t,const QString &szItemName,const KviKvsScript * pCondition); @@ -131,9 +131,9 @@ protected: public: virtual KviKvsScript * kvsIcon(); virtual KviKvsScript * kvsText(); - // this just returns a string , eventually empty + // this just returns a string, eventually empty QString evaluateText(KviKvsPopupMenuTopLevelData * pData); - // this just returns the icon , eventually + // this just returns the icon, eventually QPixmap * evaluateIcon(KviKvsPopupMenuTopLevelData * pData); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_data.cpp b/src/kvirc/kvs/kvi_kvs_treenode_data.cpp index 71b9814ff..37d28de7e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_data.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_data.cpp @@ -97,7 +97,7 @@ bool KviKvsTreeNodeData::evaluateReadOnlyInObjectScope(KviKvsObject *,KviKvsRunT return false; } -KviKvsRWEvaluationResult * KviKvsTreeNodeData::evaluateReadWriteInObjectScope(KviKvsObject * ,KviKvsRunTimeContext * c) +KviKvsRWEvaluationResult * KviKvsTreeNodeData::evaluateReadWriteInObjectScope(KviKvsObject *,KviKvsRunTimeContext * c) { c->error(this,__tr2qs_ctx("Internal error: trying to evaluate as read-write a read-only data location","kvs")); return 0; diff --git a/src/kvirc/module/kvi_mexserverimport.cpp b/src/kvirc/module/kvi_mexserverimport.cpp index f2cd95119..27fb524d3 100644 --- a/src/kvirc/module/kvi_mexserverimport.cpp +++ b/src/kvirc/module/kvi_mexserverimport.cpp @@ -25,7 +25,7 @@ #include "kvi_mexserverimport.h" KviMexServerImport::KviMexServerImport(KviModuleExtensionDescriptor * d) -: QObject() , KviModuleExtension(d) +: QObject(), KviModuleExtension(d) { } diff --git a/src/kvirc/module/kvi_mextoolbar.cpp b/src/kvirc/module/kvi_mextoolbar.cpp index 721a37b8f..cc91d5e8e 100644 --- a/src/kvirc/module/kvi_mextoolbar.cpp +++ b/src/kvirc/module/kvi_mextoolbar.cpp @@ -27,7 +27,7 @@ #include "kvi_frame.h" KviMexToolBar::KviMexToolBar(KviModuleExtensionDescriptor * pDesc, const QString & szName) -: KviToolBar(szName,Qt::TopToolBarArea) , KviModuleExtension(pDesc) +: KviToolBar(szName,Qt::TopToolBarArea), KviModuleExtension(pDesc) { g_pFrame->registerModuleExtensionToolBar(this); } diff --git a/src/kvirc/module/kvi_mextoolbar.h b/src/kvirc/module/kvi_mextoolbar.h index 83038e36c..2f413bcbe 100644 --- a/src/kvirc/module/kvi_mextoolbar.h +++ b/src/kvirc/module/kvi_mextoolbar.h @@ -29,7 +29,7 @@ class KviFrame; -class KVIRC_API KviMexToolBar : public KviToolBar , public KviModuleExtension +class KVIRC_API KviMexToolBar : public KviToolBar, public KviModuleExtension { Q_OBJECT public: diff --git a/src/kvirc/module/kvi_module.cpp b/src/kvirc/module/kvi_module.cpp index ce177e253..45ef1dc4e 100644 --- a/src/kvirc/module/kvi_module.cpp +++ b/src/kvirc/module/kvi_module.cpp @@ -72,7 +72,7 @@ extern KVIRC_API KviModuleExtensionManager * g_pModuleExtensionManager; [big]Module naming convention[/big][br] Every KVIrc module must have an "unique" name: the name is a single token, - made only of [b]lowercase[/b] letters , digits and underscores. + made only of [b]lowercase[/b] letters, digits and underscores. The real object file (library) is named "libkvi<name>.so". This convention allows KVIrc to load modules when they are referenced by name in the scripting code (the reference in the code is case insensitive diff --git a/src/kvirc/module/kvi_module.h b/src/kvirc/module/kvi_module.h index 60ccf50b3..1dd4d5930 100644 --- a/src/kvirc/module/kvi_module.h +++ b/src/kvirc/module/kvi_module.h @@ -146,7 +146,7 @@ protected: void updateAccessTime(); unsigned int secondsSinceLastAccess(); public: - // name of this module: always low case , single word + // name of this module: always low case, single word const QString & name(){ return m_szName; }; // filename of this module (with NO path): formatted as "libkvi%s.so",name() const QString & filename(){ return m_szFileName; }; diff --git a/src/kvirc/module/kvi_moduleextension.h b/src/kvirc/module/kvi_moduleextension.h index 407fbfcaf..89cf039ad 100644 --- a/src/kvirc/module/kvi_moduleextension.h +++ b/src/kvirc/module/kvi_moduleextension.h @@ -59,7 +59,7 @@ public: // this has to be public because of QPtrList... but should be protected ~KviModuleExtensionDescriptor(); private: int m_iId; // unique id assigned at creation time - KviStr m_szType; // name of the service (toolbar , crypt engine...) + KviStr m_szType; // name of the service (toolbar, crypt engine...) KviStr m_szName; // name of the extension QString m_szVisibleName; // name that is VISIBLE and possibly translated KviStr m_szAuthor; // Author (visible) diff --git a/src/kvirc/module/kvi_modulemanager.cpp b/src/kvirc/module/kvi_modulemanager.cpp index 65d6f9e75..d979234ef 100644 --- a/src/kvirc/module/kvi_modulemanager.cpp +++ b/src/kvirc/module/kvi_modulemanager.cpp @@ -218,7 +218,7 @@ bool KviModuleManager::loadModule(const QString &modName) { QString szDir; // it's more probable to have the translations in the global directory - // try it as first... (yes, catalogue overriding is impossible this way.. but , anybody cares ?) + // try it as first... (yes, catalogue overriding is impossible this way.. but, anybody cares ?) g_pApp->getGlobalKvircDirectory(szDir,KviApp::Locale); if(!KviLocale::loadCatalogue(info->szModuleContext,szDir)) diff --git a/src/kvirc/sparser/kvi_antispam.cpp b/src/kvirc/sparser/kvi_antispam.cpp index 2addb5134..3d9a09b5b 100644 --- a/src/kvirc/sparser/kvi_antispam.cpp +++ b/src/kvirc/sparser/kvi_antispam.cpp @@ -61,9 +61,9 @@ // a PRIVMSG is received from a person that has no QUERY // window open yet. // - 95% of spam messages contain an URL inside (http,ftp,www) or a channel name. -// - The other 5% contain words like auto-msg , msg me or query <nickname> +// - The other 5% contain words like auto-msg, msg me or query <nickname> // - There are some really common words: -// free , mp3 , sex , teen , porn , pics , girls , babe , pass , user... , hard , join +// free, mp3, sex, teen, porn, pics, girls, babe, pass, user..., hard, join // // In this way we can get rid of a good 70% of spam msgs. diff --git a/src/kvirc/sparser/kvi_sp_ctcp.cpp b/src/kvirc/sparser/kvi_sp_ctcp.cpp index d2a8ccb01..326bab9c3 100644 --- a/src/kvirc/sparser/kvi_sp_ctcp.cpp +++ b/src/kvirc/sparser/kvi_sp_ctcp.cpp @@ -1227,7 +1227,7 @@ void KviServerParser::parseCtcpRequestUserinfo(KviCtcpMessage *msg) echoCtcpRequest(msg); } -// FIXME: CTCP SEX , AGE , LOCATION!!! <--- so we will be safe :) +// FIXME: CTCP SEX, AGE , LOCATION!!! <--- so we will be safe :) // FIXME: KEEP THIS TABLE UP TO DATE static const char * ctcpTagTable[][2]= diff --git a/src/kvirc/sparser/kvi_sp_literal.cpp b/src/kvirc/sparser/kvi_sp_literal.cpp index b0308b2b7..e96ed98ee 100644 --- a/src/kvirc/sparser/kvi_sp_literal.cpp +++ b/src/kvirc/sparser/kvi_sp_literal.cpp @@ -557,7 +557,7 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) KviChannel * chan = msg->connection()->findChannel(szChan); if(!chan){ - // Ooops , desync with the server. + // Ooops, desync with the server. UNRECOGNIZED_MESSAGE(msg,__tr("Received a kick message for an unknown channel, possible desync")); return; } @@ -804,7 +804,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) // return; // } else { - // m_pFrm->activeWindow()->output(KVI_OUT_INTERNAL,__tr("%s requests file %s: no such file was offered , ignoring"),talker.nick(),file.ptr()); + // m_pFrm->activeWindow()->output(KVI_OUT_INTERNAL,__tr("%s requests file %s: no such file was offered, ignoring"),talker.nick(),file.ptr()); // return; // } // } @@ -821,7 +821,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) { // New query requested. Check if we really should create it or not - // first of all the anti spam , if desired. + // first of all the anti spam, if desired. // the antispam blocks anything else // Eventually we could trigger a special event to notify the user of the // spam message... @@ -1192,7 +1192,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { // New query requested. Check if we really should create it or not - // first of all the anti spam , if desired. + // first of all the anti spam, if desired. // the antispam blocks anything else // Eventually we could trigger a special event to notify the user of the // spam message... @@ -1505,8 +1505,8 @@ void KviServerParser::parseLiteralNick(KviIrcMessage *msg) } KviQuery * q = console->connection()->findQuery(szNick); // It CAN happen that szNewNick first queries us without being - // on any channel then he QUITS , he reconnects , he joins - // a channel with szNick , queries us and changes nick to szNewNick : gotcha! + // on any channel then he QUITS, he reconnects, he joins + // a channel with szNick, queries us and changes nick to szNewNick : gotcha! // should merge the queries! KviQuery * old = console->connection()->findQuery(szNewNick); if(old && (old != q)) @@ -1691,7 +1691,7 @@ void KviServerParser::parseLiteralMode(KviIrcMessage *msg) KviChannel * chan = msg->connection()->findChannel(szTarget); if(!chan){ - // Ooops , desync with the server. + // Ooops, desync with the server. UNRECOGNIZED_MESSAGE(msg,__tr("Received a mode change for an unknown channel, possible desync")); return; } diff --git a/src/kvirc/sparser/kvi_sp_numeric.cpp b/src/kvirc/sparser/kvi_sp_numeric.cpp index 0ce0e2fd5..c9c35060a 100644 --- a/src/kvirc/sparser/kvi_sp_numeric.cpp +++ b/src/kvirc/sparser/kvi_sp_numeric.cpp @@ -69,7 +69,7 @@ // Numeric message handlers // FIXME: #warning "IN ALL OUTPUT ADD ESCAPE SEQUENCES!!!!" -// FIXME: #warning "parseErrorUnknownModeChar() for modes e and I , parseErrorUnknownCommand for WATCH" +// FIXME: #warning "parseErrorUnknownModeChar() for modes e and I, parseErrorUnknownCommand for WATCH" void KviServerParser::parseNumeric001(KviIrcMessage *msg) { @@ -383,7 +383,7 @@ void KviServerParser::parseNumericMotd(KviIrcMessage *msg) // :prefix 375 target : - <server> Message of the Day - // 372: RPL_ENDOFMOTD [I,E,U,D] // :prefix 376 target :End of /MOTD command. - // FIXME: #warning "SKIP MOTD , MOTD IN A SEPARATE WINDOW , SILENT ENDOFMOTD , MOTD IN ACTIVE WINDOW" + // FIXME: #warning "SKIP MOTD, MOTD IN A SEPARATE WINDOW, SILENT ENDOFMOTD, MOTD IN ACTIVE WINDOW" if(!msg->haltOutput()) msg->console()->outputNoFmt(KVI_OUT_MOTD,msg->connection()->decodeText(msg->safeTrailing())); @@ -1926,7 +1926,7 @@ void KviServerParser::parseNumericWatch(KviIrcMessage *msg) } // not handled...output it -// FIXME: #warning "OUTPUT IT! (In a suitable way) (And handle 602 , 603 , 606 and 607 gracefully)" +// FIXME: #warning "OUTPUT IT! (In a suitable way) (And handle 602, 603, 606 and 607 gracefully)" if(!msg->haltOutput()) { KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolServerRepliesToActiveWindow) ? diff --git a/src/kvirc/ui/kvi_channel.cpp b/src/kvirc/ui/kvi_channel.cpp index da67f162b..06d13a2dc 100644 --- a/src/kvirc/ui/kvi_channel.cpp +++ b/src/kvirc/ui/kvi_channel.cpp @@ -1160,7 +1160,7 @@ void KviChannel::ownMessage(const QString & szBuffer, bool bUserFeedback) return; if(bUserFeedback) { - // ugly ,but we must redecode here + // ugly,but we must redecode here QString szRedecoded = decodeText(encrypted.ptr()); m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, QString(),QString(),QString(),szRedecoded,KviConsole::NoNotifications); diff --git a/src/kvirc/ui/kvi_customtoolbar.cpp b/src/kvirc/ui/kvi_customtoolbar.cpp index e19230210..8250da122 100644 --- a/src/kvirc/ui/kvi_customtoolbar.cpp +++ b/src/kvirc/ui/kvi_customtoolbar.cpp @@ -411,12 +411,12 @@ int KviCustomToolBar::dropIndexAt(const QPoint & pnt, QWidget * pExclude, int * } } - // ok , check again (we might have moved exactly over exclude idx now!) + // ok, check again (we might have moved exactly over exclude idx now!) if((iExcludeIdx != -1) && (iExcludeIdx != iMinDistIdx)) { // got the exclude idx by the way and wouldn't put exactly over it // check if exclude idx is "before" the current possible insert position - // if it is , then lower down the index by one + // if it is, then lower down the index by one if(orientation() == Qt::Horizontal) { if(pnt.x() > pntExclude.x()) diff --git a/src/kvirc/ui/kvi_filedialog.cpp b/src/kvirc/ui/kvi_filedialog.cpp index ec48af8fb..156c0226f 100644 --- a/src/kvirc/ui/kvi_filedialog.cpp +++ b/src/kvirc/ui/kvi_filedialog.cpp @@ -65,7 +65,7 @@ void KviFileDialog::goHome() */ #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) -bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool bShowNative, QWidget * pParent) +bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool bShowNative, QWidget * pParent) { if(bShowNative) { @@ -74,7 +74,7 @@ bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCap return !szBuffer.isEmpty(); } #else -bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool , QWidget * pParent) +bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool, QWidget * pParent) { #endif KviFileDialog * pDialog = new KviFileDialog(szInitial,szFilter,pParent,"open_file_name_dialog",true); @@ -97,7 +97,7 @@ bool KviFileDialog::askForOpenFileName(QString & szBuffer, const QString & szCap } #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) -bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool bConfirmOverwrite, bool bShowNative, QWidget * pParent) +bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool bConfirmOverwrite, bool bShowNative, QWidget * pParent) { if(bShowNative) { @@ -131,7 +131,7 @@ bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCap } } #else -bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool bConfirmOverwrite, bool , QWidget * pParent) +bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool bConfirmOverwrite, bool, QWidget * pParent) { #endif @@ -190,7 +190,7 @@ bool KviFileDialog::askForSaveFileName(QString & szBuffer, const QString & szCap } #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) -bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool bShowNative, QWidget * pParent) +bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool bShowNative, QWidget * pParent) { if(bShowNative) { @@ -199,7 +199,7 @@ bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCa return !szBuffer.isEmpty(); } #else -bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool , QWidget * pParent) +bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool, QWidget * pParent) { #ifdef COMPILE_KDE_SUPPORT // the KDE based dir selection dialog is now quite nice @@ -230,7 +230,7 @@ bool KviFileDialog::askForDirectoryName(QString & szBuffer, const QString & szCa } #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) -bool KviFileDialog::askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool bShowNative, QWidget * pParent) +bool KviFileDialog::askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool bShowNative, QWidget * pParent) { if(bShowNative) { @@ -238,7 +238,7 @@ bool KviFileDialog::askForOpenFileNames(QStringList & szBuffer, const QString & return (szBuffer.count() > 0); } #else -bool KviFileDialog::askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool , bool , QWidget * pParent) +bool KviFileDialog::askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter, bool, bool, QWidget * pParent) { #endif diff --git a/src/kvirc/ui/kvi_frame.cpp b/src/kvirc/ui/kvi_frame.cpp index 5d0549203..221304d0a 100644 --- a/src/kvirc/ui/kvi_frame.cpp +++ b/src/kvirc/ui/kvi_frame.cpp @@ -300,27 +300,27 @@ void KviFrame::installAccelerators() new QShortcut(QKeySequence(KVI_SHORTCUTS_WIN_MINIMIZE),this,SLOT(minimizeWindow()),0,Qt::ApplicationShortcut); static int accel_table[] = { - Qt::Key_1 + Qt::ControlModifier , // script accels... - Qt::Key_2 + Qt::ControlModifier , - Qt::Key_3 + Qt::ControlModifier , - Qt::Key_4 + Qt::ControlModifier , - Qt::Key_5 + Qt::ControlModifier , - Qt::Key_6 + Qt::ControlModifier , - Qt::Key_7 + Qt::ControlModifier , - Qt::Key_8 + Qt::ControlModifier , - Qt::Key_9 + Qt::ControlModifier , - Qt::Key_0 + Qt::ControlModifier , - Qt::Key_F2 , - Qt::Key_F3 , - Qt::Key_F4 , - Qt::Key_F5 , - Qt::Key_F6 , - Qt::Key_F7 , - Qt::Key_F8 , - Qt::Key_F9 , - Qt::Key_F10 , - Qt::Key_F11 , - Qt::Key_F12 , + Qt::Key_1 + Qt::ControlModifier, // script accels... + Qt::Key_2 + Qt::ControlModifier, + Qt::Key_3 + Qt::ControlModifier, + Qt::Key_4 + Qt::ControlModifier, + Qt::Key_5 + Qt::ControlModifier, + Qt::Key_6 + Qt::ControlModifier, + Qt::Key_7 + Qt::ControlModifier, + Qt::Key_8 + Qt::ControlModifier, + Qt::Key_9 + Qt::ControlModifier, + Qt::Key_0 + Qt::ControlModifier, + Qt::Key_F2, + Qt::Key_F3, + Qt::Key_F4, + Qt::Key_F5, + Qt::Key_F6, + Qt::Key_F7, + Qt::Key_F8, + Qt::Key_F9, + Qt::Key_F10, + Qt::Key_F11, + Qt::Key_F12, 0 }; @@ -487,9 +487,9 @@ void KviFrame::addWindow(KviWindow *wnd,bool bShow) if(bDocked) { - // when group settings are used , we always cascade the windows + // when group settings are used, we always cascade the windows // this means that windows that have no specialized config group name - // are always cascaded : this is true for consoles , queries (and other windows) but not channels (and some other windows) + // are always cascaded : this is true for consoles, queries (and other windows) but not channels (and some other windows) KviMdiChild * lpC = dockWindow(wnd,bGroupSettings,&rect); lpC->setRestoredGeometry(rect); wnd->triggerCreationEvents(); diff --git a/src/kvirc/ui/kvi_frame.h b/src/kvirc/ui/kvi_frame.h index 2ee747956..d9b31147a 100644 --- a/src/kvirc/ui/kvi_frame.h +++ b/src/kvirc/ui/kvi_frame.h @@ -75,7 +75,7 @@ public: -class KVIRC_API KviFrame : public KviTalMainWindow // , public KviIrcContextManager +class KVIRC_API KviFrame : public KviTalMainWindow //, public KviIrcContextManager { friend class KviWindow; friend class KviConsole; diff --git a/src/kvirc/ui/kvi_imagedialog.h b/src/kvirc/ui/kvi_imagedialog.h index 4921f12ce..cc6371ff7 100644 --- a/src/kvirc/ui/kvi_imagedialog.h +++ b/src/kvirc/ui/kvi_imagedialog.h @@ -42,7 +42,7 @@ public: QString m_szTipText; public: KviImageDialogItem(KviTalListWidget * b,const QPixmap &thumb,const QString &szFile,const QString &image_id,const QString &szTipText = QString(),bool bIsFolder = false) - : KviTalListWidgetPixmap(b,thumb,szFile) , m_bIsFolder(bIsFolder) , m_szImageId(image_id) , m_szTipText(szTipText) {}; + : KviTalListWidgetPixmap(b,thumb,szFile), m_bIsFolder(bIsFolder), m_szImageId(image_id), m_szTipText(szTipText) {}; ~KviImageDialogItem(){}; public: bool isFolder(){ return m_bIsFolder; }; diff --git a/src/kvirc/ui/kvi_input.cpp b/src/kvirc/ui/kvi_input.cpp index f7360d009..ae97c26b0 100644 --- a/src/kvirc/ui/kvi_input.cpp +++ b/src/kvirc/ui/kvi_input.cpp @@ -360,7 +360,7 @@ void KviInput::setFocus() void KviInput::focusInEvent(QFocusEvent *) { - // if we get a focus in event , redirect the focus to the children + // if we get a focus in event, redirect the focus to the children if(m_pMultiLineEditor) m_pMultiLineEditor->setFocus(); else diff --git a/src/kvirc/ui/kvi_ipeditor.cpp b/src/kvirc/ui/kvi_ipeditor.cpp index cb54c20b7..8aa0cf199 100644 --- a/src/kvirc/ui/kvi_ipeditor.cpp +++ b/src/kvirc/ui/kvi_ipeditor.cpp @@ -130,7 +130,7 @@ bool KviIpEditor::setAddress(const QString &ipAddr) QByteArray str(anchor,c - anchor); bool bOk; int num = str.toInt(&bOk); - if(!bOk)return false; // should never happen , but just to be sure + if(!bOk)return false; // should never happen, but just to be sure if((num < 0) || (num > 255))return false; // Invalid field m_pEdit[i]->setText(str.data()); if(i < 3){ @@ -184,7 +184,7 @@ QString KviIpEditor::address() const void KviIpEditor::recreateChildren() { - // A bit slow , but compact + // A bit slow, but compact bool bIPv4 = (m_addrType == IPv4); int max = bIPv4 ? 4 : 8; QFontMetrics fm(font()); @@ -209,7 +209,7 @@ void KviIpEditor::recreateChildren() m_pLabel[i]->setBackgroundRole(isEnabled() ? QPalette::Base : QPalette::Background); } } - // Kill the unused widgets , if any + // Kill the unused widgets, if any if(bIPv4) { for(int i=4;i<8;i++) @@ -300,7 +300,7 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) s.insert(cursorPos,c); bool bOk = false; int num = s.toInt(&bOk); - if(!bOk)return true; //should never happen , but just to be sure + if(!bOk)return true; //should never happen, but just to be sure if((num < 0) || (num > 255))return true; //invalid field m_pEdit[edIdx]->setText(s); if(num > 25) diff --git a/src/kvirc/ui/kvi_ipeditor.h b/src/kvirc/ui/kvi_ipeditor.h index 80fad8058..d3f877ab9 100644 --- a/src/kvirc/ui/kvi_ipeditor.h +++ b/src/kvirc/ui/kvi_ipeditor.h @@ -37,7 +37,7 @@ class KVIRC_API KviIpEditor : public QFrame { Q_OBJECT public: - enum AddressType { IPv4 , IPv6 }; + enum AddressType { IPv4, IPv6 }; KviIpEditor(QWidget * parent,AddressType = IPv4,const QString &ipAddr = QString(),const char *name = 0); ~KviIpEditor(); private: diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp index b3a2f61b8..8d8b47a07 100644 --- a/src/kvirc/ui/kvi_ircview.cpp +++ b/src/kvirc/ui/kvi_ircview.cpp @@ -28,35 +28,35 @@ // // #define HOPE_THAT_IT_WILL_NEVER_NEED_TO_BE_MODIFIED :) -// 07 May 1999 , -// Already forgot how this damn thing works , +// 07 May 1999, +// Already forgot how this damn thing works, // and spent 1 hour over a stupid bug. // I had to recreate the whole thing in my mind......ooooouh... // How did I wrote it ? // Just take a look to paintEvent() or to calculateLineWraps()... // Anyway...I've solved the bug. -// 23 Nov 1999 , -// Well , not so bad...I seem to still remember how it works -// So just for fun , complicated the things a little bit more. +// 23 Nov 1999, +// Well, not so bad...I seem to still remember how it works +// So just for fun, complicated the things a little bit more. // Added precaclucaltion of the text blocks and word wrapping // and a fast scrolling mode (3 lines at once) for consecutive // appendText() calls. // Now the code becomes really not understandable...:) -// 29 Jun 2000 21:02 , +// 29 Jun 2000 21:02, // Here we go again... I have to adjust this stuff for 3.0.0 // Will I make this thingie work ? -// 01 Jul 2000 04:20 (AM!) , +// 01 Jul 2000 04:20 (AM!), // Yes....I got it to work just now -// and YES , complicated the things yet more. +// and YES, complicated the things yet more. // This time made some paint event code completely unreadable // by placing two monster macros... // I hope that you have a smart compiler (such as gcc is). // 09 Dec 2000 // This is my C-asm-optimisation-hack playground -// Expect Bad Programming(tm) , Ugly Code(tm) , Unreadable Macros (tm) +// Expect Bad Programming(tm), Ugly Code(tm), Unreadable Macros (tm) // and massive usage of the Evil(tm) goto. // 25 Sep 2001 @@ -165,8 +165,8 @@ //#define KVI_IRCVIEW_MAX_LINES 1024 // A little bit more than the scroll-bar... // Qt+X have strange interactions that I can not understand when I try to move the splitter -// to the maximum on the left , Maybe the cache pixmap size becomes negative ? (I don't think so) -// Anyway , when the scroll bar position becomes negative (or the IrcView has smaller width than +// to the maximum on the left, Maybe the cache pixmap size becomes negative ? (I don't think so) +// Anyway, when the scroll bar position becomes negative (or the IrcView has smaller width than // the scroll bar) X aborts with a funny // X Error: BadDrawable (invalid Pixmap or Window parameter) 9 // Major opcode: 55 @@ -535,9 +535,9 @@ void KviIrcView::setTimestamp(bool bTimestamp) m_bTimestamp = bTimestamp; -// STATS FOR A BUFFER FULL OF HIGHLY COLORED STRINGS , HIGHLY WRAPPED +// STATS FOR A BUFFER FULL OF HIGHLY COLORED STRINGS, HIGHLY WRAPPED // -// Lines = 1024 (322425 bytes - 314 KB) (avg 314 bytes per line) , well :) +// Lines = 1024 (322425 bytes - 314 KB) (avg 314 bytes per line), well :) // string bytes = 87745 (85 KB) // attributes = 3576 (42912 bytes - 41 KB) // blocks = 12226 (146712 bytes - 143 KB) @@ -1022,7 +1022,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) if(p) { - r = p->rect(); // app triggered , or self triggered from fastScroll (in that case m_iUnprocessedPaintEventRequests is set to 0 there) + r = p->rect(); // app triggered, or self triggered from fastScroll (in that case m_iUnprocessedPaintEventRequests is set to 0 there) if(r == rect()) m_iUnprocessedPaintEventRequests = 0; // only full repaints reset } else { @@ -1249,7 +1249,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) } } else { - // no attributes , it is a line wrap + // no attributes, it is a line wrap curLeftCoord = defLeftCoord; if(KVI_OPTION_BOOL(KviOption_boolIrcViewWrapMargin))curLeftCoord+=m_iWrapMargin; curBottomCoord += m_iFontLineSpacing; @@ -1395,7 +1395,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) int wdth = block->block_width; if(wdth == 0) { - // Last block before a word wrap , or a zero characters attribute block ? + // Last block before a word wrap, or a zero characters attribute block ? if(i < (pCurTextLine->iBlockCount - 1)) { // There is another block... @@ -1431,7 +1431,7 @@ no_selection_paint: if(!daIcon) { // this should never happen since we do a check - // when building the text icon block , but.. better safe than sorry: + // when building the text icon block, but.. better safe than sorry: // so... we lost some icons ? wrong associations ? // recover it by displaying the "question mark" icon daIcon = g_pIconManager->getSmallIcon(KVI_SMALLICON_HELP); // must be there, eventually null pixmap :D @@ -1719,7 +1719,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) curLineWidth+=IRCVIEW_WCHARWIDTH(*p); uLoopedChars++; } while((curLineWidth < maxWidth) && (curBlockLen < maxBlockLen)); - // Now overrunned , go back 1 char (if we ran over at least 2 chars) + // Now overrunned, go back 1 char (if we ran over at least 2 chars) if(uLoopedChars>1) { p--; diff --git a/src/kvirc/ui/kvi_ircview_events.cpp b/src/kvirc/ui/kvi_ircview_events.cpp index 15577f00f..29d71e5e3 100644 --- a/src/kvirc/ui/kvi_ircview_events.cpp +++ b/src/kvirc/ui/kvi_ircview_events.cpp @@ -95,13 +95,13 @@ [big]Builtin links[/big][br] The builtin links have builtin actions performed when the user interact with the link.[br] - These links are used internally in KVIrc , but you can use them too.[br] + These links are used internally in KVIrc, but you can use them too.[br] The <escape_command> is a single letter this time: it defines the type of the link.[br] Currently KVIrc uses six types of builtin links : 'n' for nickname links, 'u' for url links, 'c' for channel links, 'h' for hostname links, 'm' for mode links and 's' for server links.[br] Theoretically you can also use your own link types: just use any other letter or digit (you can't use ']' and <cr>), but probably you will prefer a completely user defined link in that case anyway.[br] - Once the user interacts with the link , kvirc executes the predefined events:[br] + Once the user interacts with the link, kvirc executes the predefined events:[br] On right-click the event OnBuiltinLinkRightClicked is triggered: the first parameter is the link type, the second parameter is the <visible text> (as a single parameter!!!)[br] On middle-click the event OnBuiltinLinkMiddleClicked is triggered: the parameters are similar to the previous one.[br] diff --git a/src/kvirc/ui/kvi_ircview_gettextline.cpp b/src/kvirc/ui/kvi_ircview_gettextline.cpp index 4500ea49e..38d37828f 100644 --- a/src/kvirc/ui/kvi_ircview_gettextline.cpp +++ b/src/kvirc/ui/kvi_ircview_gettextline.cpp @@ -321,7 +321,7 @@ const kvi_wchar_t * KviIrcView::getTextLine( // 18aa: ff 24 85 20 00 00 00 jmp *0x20(,%eax,4) // // but sth tells me that "jmp *0x20(,%eax,4)" takes a loooooot of clock ticks... - // ...we have less instructions , but the code takes longer to execute (7-8% longer) + // ...we have less instructions, but the code takes longer to execute (7-8% longer) // it might be also due to pipeline tricks, jump "next instruction precalculation" stuff... // So we end up using the first version here @@ -970,7 +970,7 @@ check_emoticon_char: // It happens really too often to have an 8 followed by a parenthesis // that is not an emoticon - // *begin can be one of ':' , ';' , '=' + // *begin can be one of ':', ';', '=' if(*p == '-')p++; // FIXME: we could handle also 'o' as a nose ??? (extreme: also '+' ?) // FIXME: use a "jump-like-check-table" here ? .... it would be surely faster // FIXME: handle also '[',']','\\','p','@','#','<','>','|' ??? diff --git a/src/kvirc/ui/kvi_msgbox.h b/src/kvirc/ui/kvi_msgbox.h index c69746f74..2ea90f37e 100644 --- a/src/kvirc/ui/kvi_msgbox.h +++ b/src/kvirc/ui/kvi_msgbox.h @@ -29,8 +29,8 @@ /* class KviMessageBox : public KviTalMessageBox { - enum Result { Yes , No , Ok , Cancel }; - enum ButtonResult { Button1 , Button2 , Button3 }; + enum Result { Yes, No, Ok, Cancel }; + enum ButtonResult { Button1, Button2, Button3 }; KVIRC_API void warning(const char * fmt,...); KVIRC_API void information(const char * fmt,...); diff --git a/src/kvirc/ui/kvi_query.cpp b/src/kvirc/ui/kvi_query.cpp index 4ea230c10..bfa9eedcb 100644 --- a/src/kvirc/ui/kvi_query.cpp +++ b/src/kvirc/ui/kvi_query.cpp @@ -603,7 +603,7 @@ void KviQuery::ownMessage(const QString & szBuffer, bool bUserFeedback) return; if(bUserFeedback) { - // ugly ,but we must redecode here + // ugly,but we must redecode here QString szRedecoded = decodeText(encrypted.ptr()); m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, QString(),QString(),QString(),szRedecoded,KviConsole::NoNotifications); diff --git a/src/kvirc/ui/kvi_selectors.cpp b/src/kvirc/ui/kvi_selectors.cpp index a8ca4756a..f35e3f2d3 100644 --- a/src/kvirc/ui/kvi_selectors.cpp +++ b/src/kvirc/ui/kvi_selectors.cpp @@ -66,7 +66,7 @@ void KviBoolSelector::commit() KviUIntSelector::KviUIntSelector(QWidget * par,const QString & txt,unsigned int *pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled,bool bShortInt) -: KviTalHBox(par) , KviSelectorInterface() +: KviTalHBox(par), KviSelectorInterface() { m_pLabel = new QLabel(txt,this); //m_pLineEdit = new QLineEdit(this); @@ -129,7 +129,7 @@ void KviUIntSelector::setEnabled(bool bEnabled) KviStringSelector::KviStringSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled) -: KviTalHBox(par) , KviSelectorInterface() +: KviTalHBox(par), KviSelectorInterface() { m_pLabel = new QLabel(txt,this); m_pLineEdit = new QLineEdit(this); @@ -167,7 +167,7 @@ void KviStringSelector::setText(const QString& text){ } KviPasswordSelector::KviPasswordSelector(QWidget * par,const QString & txt,QString *pOption,bool bEnabled) -: KviTalHBox(par) , KviSelectorInterface() +: KviTalHBox(par), KviSelectorInterface() { setSpacing(0); setMargin(0); diff --git a/src/kvirc/ui/kvi_statusbarapplet.h b/src/kvirc/ui/kvi_statusbarapplet.h index 63681e1ef..0821471a2 100644 --- a/src/kvirc/ui/kvi_statusbarapplet.h +++ b/src/kvirc/ui/kvi_statusbarapplet.h @@ -117,7 +117,7 @@ class KviStatusBarClock : public KviStatusBarApplet public: KviStatusBarClock(KviStatusBar * pParent, KviStatusBarAppletDescriptor * pDescriptor); virtual ~KviStatusBarClock(); - enum Format { HMS , HM }; + enum Format { HMS, HM }; protected: bool m_bUtc; bool m_b24h; diff --git a/src/kvirc/ui/kvi_topicw.h b/src/kvirc/ui/kvi_topicw.h index 9875905f8..6be6a7f65 100644 --- a/src/kvirc/ui/kvi_topicw.h +++ b/src/kvirc/ui/kvi_topicw.h @@ -90,7 +90,7 @@ protected: void updateToolTip(); void deactivate(); void iconButtonClicked(); - virtual bool eventFilter(QObject * o ,QEvent * e); + virtual bool eventFilter(QObject * o,QEvent * e); virtual void mousePressEvent(QMouseEvent * e); virtual void keyPressEvent(QKeyEvent * e); virtual void resizeEvent(QResizeEvent * e); diff --git a/src/kvirc/ui/kvi_userlistview.cpp b/src/kvirc/ui/kvi_userlistview.cpp index c26fa1197..d96c61134 100644 --- a/src/kvirc/ui/kvi_userlistview.cpp +++ b/src/kvirc/ui/kvi_userlistview.cpp @@ -652,7 +652,7 @@ void KviUserListView::insertUserEntry(const QString & szNnick, KviUserListEntry // is half oped ? if(!(pUserEntry->m_iFlags & KVI_USERFLAG_HALFOP)) { - // nope , skip halfops + // nope, skip halfops while(pEntry && (pEntry->m_iFlags & KVI_USERFLAG_HALFOP)) { if(pEntry == m_pTopItem) @@ -663,7 +663,7 @@ void KviUserListView::insertUserEntry(const QString & szNnick, KviUserListEntry // is voiced ? if(!(pUserEntry->m_iFlags & KVI_USERFLAG_VOICE)) { - // nope , not voiced so skip voiced users + // nope, not voiced so skip voiced users while(pEntry && (pEntry->m_iFlags & KVI_USERFLAG_VOICE)) { if(pEntry == m_pTopItem) @@ -674,7 +674,7 @@ void KviUserListView::insertUserEntry(const QString & szNnick, KviUserListEntry // is userop'd? if(!(pUserEntry->m_iFlags & KVI_USERFLAG_USEROP)) { - // nope , skip userops + // nope, skip userops while(pEntry && (pEntry->m_iFlags & KVI_USERFLAG_USEROP)) { if(pEntry == m_pTopItem) @@ -682,10 +682,10 @@ void KviUserListView::insertUserEntry(const QString & szNnick, KviUserListEntry pEntry = pEntry->m_pNext; } } // else is userop, ops, halfops, and voiced are skipped - } // else it is voiced , ops and halfops are skipped - } // else it is halfop , ops are skipped - } // else it is op , chan admins are skipped - } // else it is chan admin , chan owners are skipped + } // else it is voiced, ops and halfops are skipped + } // else it is halfop, ops are skipped + } // else it is op, chan admins are skipped + } // else it is chan admin, chan owners are skipped } // else it is chan owner, so nothing to skip: they are first in the list // now strcmp within the current user-flag group... @@ -774,7 +774,7 @@ KviUserListEntry * KviUserListView::join(const QString & szNick, const QString & // if(!host.isEmpty()) - it can be UHNAMES with host or NAMEX(X) w/o it // { // Ok...the user was already on... - // Probably this is a NAMES(X) reply , and the user IS_ME + // Probably this is a NAMES(X) reply, and the user IS_ME // (already joined after the JOIN message) if(iFlags != pEntry->m_iFlags) { @@ -825,7 +825,7 @@ bool KviUserListView::avatarChanged(const QString & szNick) pUserEntry->updateAvatarData(); pUserEntry->recalcSize(); m_iTotalHeight += pUserEntry->m_iHeight; - // if this was "over" the top item , we must adjust the scrollbar value + // if this was "over" the top item, we must adjust the scrollbar value // otherwise scroll everything down KviUserListEntry * pEntry = m_pHeadItem; bool bGotTopItem = false; @@ -840,7 +840,7 @@ bool KviUserListView::avatarChanged(const QString & szNick) if(!bGotTopItem && (m_pTopItem != pUserEntry)) { - // we're "over" the top item , so over the + // we're "over" the top item, so over the // upper side of the view...adjust the scroll bar value int iHeightDiff = pUserEntry->m_iHeight - iOldHeight; m_pViewArea->m_iLastScrollBarVal += iHeightDiff; @@ -1849,10 +1849,10 @@ void KviUserListViewArea::paintEvent(QPaintEvent * e) { // the g_pUserChanStatePixmap is 36 x 80 pixels // divided into 6 rows of 5 pixmaps - // row 0 is hot , row 5 is cold - // left is most active , right is least active - // e->m_iTemperature is a signed short , negative values are cold - // e->m_lastActionTime is the time of the last action (eventually 0 , if not known) + // row 0 is hot, row 5 is cold + // left is most active, right is least active + // e->m_iTemperature is a signed short, negative values are cold + // e->m_lastActionTime is the time of the last action (eventually 0, if not known) // 6 bit right shift is an aprox division for 64 : really aprox minutes unsigned int uTimeDiff = (((unsigned int)(curTime - pEntry->m_lastActionTime)) >> 6); if(uTimeDiff < 16) diff --git a/src/kvirc/ui/kvi_window.cpp b/src/kvirc/ui/kvi_window.cpp index a87442aa5..11ccb54db 100644 --- a/src/kvirc/ui/kvi_window.cpp +++ b/src/kvirc/ui/kvi_window.cpp @@ -1022,7 +1022,7 @@ bool KviWindow::eventFilter(QObject *o,QEvent *e) { m_pFocusHandler->setFocus(); } else { - setFocus(); // we grab the focus (someone must do it , damn :D) + setFocus(); // we grab the focus (someone must do it, damn :D) } } break; diff --git a/src/kvirc/ui/kvi_window.h b/src/kvirc/ui/kvi_window.h index d3d412494..b3b22adbd 100644 --- a/src/kvirc/ui/kvi_window.h +++ b/src/kvirc/ui/kvi_window.h @@ -183,7 +183,7 @@ public: // THIS is the function that should be used inline const QString & windowName(){ return m_szName; }; void setWindowName(const QString &szName); - // Sets the progress for the WindowList item: if "progress" makes sense in your window , well , use this + // Sets the progress for the WindowList item: if "progress" makes sense in your window, well, use this void setProgress(int progress); // Window type management inline int type() const { return m_iType; }; diff --git a/src/kvirc/ui/kvi_windowlist.cpp b/src/kvirc/ui/kvi_windowlist.cpp index 75a480a3f..21b5f86b8 100644 --- a/src/kvirc/ui/kvi_windowlist.cpp +++ b/src/kvirc/ui/kvi_windowlist.cpp @@ -203,7 +203,7 @@ KviWindowListItem::~KviWindowListItem() KviWindowListButton::KviWindowListButton(QWidget * par,KviWindow * wnd,const char * name) -: QPushButton(par) , KviWindowListItem(wnd) +: QPushButton(par), KviWindowListItem(wnd) { setObjectName(name); m_bActive = false; diff --git a/src/kvirc/ui/kvi_windowlist.h b/src/kvirc/ui/kvi_windowlist.h index 4711eb28b..60c985653 100644 --- a/src/kvirc/ui/kvi_windowlist.h +++ b/src/kvirc/ui/kvi_windowlist.h @@ -122,7 +122,7 @@ protected slots: class KviClassicWindowList; -class KVIRC_API KviWindowListButton : public QPushButton , KviWindowListItem +class KVIRC_API KviWindowListButton : public QPushButton, KviWindowListItem { friend class KviClassicWindowList; Q_OBJECT diff --git a/src/kvirc/ui/kvi_windowlist_tree.cpp b/src/kvirc/ui/kvi_windowlist_tree.cpp index 80b1f4a90..786163bdb 100644 --- a/src/kvirc/ui/kvi_windowlist_tree.cpp +++ b/src/kvirc/ui/kvi_windowlist_tree.cpp @@ -49,13 +49,13 @@ extern QPixmap * g_pActivityMeterPixmap; // KviTreeWindowListItem KviTreeWindowListItem::KviTreeWindowListItem(QTreeWidget * par,KviWindow * wnd) -: QTreeWidgetItem(par) , KviWindowListItem(wnd) +: QTreeWidgetItem(par), KviWindowListItem(wnd) { applyOptions(); } KviTreeWindowListItem::KviTreeWindowListItem(KviTreeWindowListItem * par,KviWindow * wnd) -: QTreeWidgetItem(par) , KviWindowListItem(wnd) +: QTreeWidgetItem(par), KviWindowListItem(wnd) { applyOptions(); } @@ -395,7 +395,7 @@ KviWindowListItem * KviTreeWindowList::addItem(KviWindow * wnd) } } - // console , or a window that has no irc context + // console, or a window that has no irc context return new KviTreeWindowListItem(m_pTreeWidget,wnd); } diff --git a/src/kvirc/ui/kvi_windowlist_tree.h b/src/kvirc/ui/kvi_windowlist_tree.h index 30e6b06cd..f816ca4ed 100644 --- a/src/kvirc/ui/kvi_windowlist_tree.h +++ b/src/kvirc/ui/kvi_windowlist_tree.h @@ -32,7 +32,7 @@ class KviTreeWindowList; class KviTreeWindowListItemInternal; -class KVIRC_API KviTreeWindowListItem : public QTreeWidgetItem , public KviWindowListItem +class KVIRC_API KviTreeWindowListItem : public QTreeWidgetItem, public KviWindowListItem { friend class KviTreeWindowList; friend class KviTreeWindowListTreeWidget; diff --git a/src/modules/about/libkviabout.cpp b/src/modules/about/libkviabout.cpp index 07d1dfa52..c8f9c4678 100644 --- a/src/modules/about/libkviabout.cpp +++ b/src/modules/about/libkviabout.cpp @@ -95,7 +95,7 @@ KVIRC_MODULE( "Szymon Stefanek <pragma at kvirc dot net>" \ "Elvio Basello <hellvis69 at netsons dot org>", "Exports the /about.kvirc command\n", - about_module_init , + about_module_init, about_module_can_unload, 0, about_module_cleanup, diff --git a/src/modules/action/libkviaction.cpp b/src/modules/action/libkviaction.cpp index 06234d599..809a58218 100644 --- a/src/modules/action/libkviaction.cpp +++ b/src/modules/action/libkviaction.cpp @@ -502,7 +502,7 @@ static bool action_kvs_fnc_isEnabled(KviKvsModuleFunctionCall * c) static bool action_module_init(KviModule *m) { - // setlabel , $label , $position , move , $itempos , $itemexists , $itemtype + // setlabel, $label, $position, move, $itempos, $itemexists, $itemtype KVSM_REGISTER_SIMPLE_COMMAND(m,"list",action_kvs_cmd_list); KVSM_REGISTER_SIMPLE_COMMAND(m,"trigger",action_kvs_cmd_trigger); KVSM_REGISTER_SIMPLE_COMMAND(m,"enable",action_kvs_cmd_enable); diff --git a/src/modules/config/libkviconfig.cpp b/src/modules/config/libkviconfig.cpp index 3682961ee..87174f2ba 100644 --- a/src/modules/config/libkviconfig.cpp +++ b/src/modules/config/libkviconfig.cpp @@ -45,21 +45,21 @@ static int g_iNextConfigId = 0; $config.open(<filename:string>[,<flags:string>]) @description: Opens a config file. - If the file already exists , its contents + If the file already exists, its contents are parsed and available for extracting by the [fnc]$config.read[/fnc]() function.[br] <filename> may be an absolute path or a relative path: if a relative path is used, KVIrc will complete it with a local kvirc directory suitable for writing script config files.[br] - If the config file doesn't exist , it is opened as empty config file.[br] + If the config file doesn't exist, it is opened as empty config file.[br] Flags can contain a combination of letters 'r' and 'w'.[br] - If only 'r' is specified , the config file is opened in "read-only" mode: no changes will be written to disk.[br] - If only 'w' is specified , the config file is opened in "write-only" mode: the contents of the file on disk + If only 'r' is specified, the config file is opened in "read-only" mode: no changes will be written to disk.[br] + If only 'w' is specified, the config file is opened in "write-only" mode: the contents of the file on disk are not readed.[br] If <flags> are not specified then 'rw' is assumed.[br] The function returns an identifier for the open config file. This identifier is a mandatory parameter in all the other config.* functions and commands.[br] The config section is set to the default section name: you can change it by using [cmd]config.setsection[/cmd].[br] - After you have finished using the file , don't forget to call [cmd]config.close[/cmd]! + After you have finished using the file, don't forget to call [cmd]config.close[/cmd]! KVIrc tries to not open a config file twice: if the file was already opened then the identifier of the open file is returned.[br] You can check if a config file is already open by using the @@ -513,7 +513,7 @@ static bool config_kvs_fnc_filelist(KviKvsModuleFunctionCall * c) Closes the config file identified by <id>.[br] <id> must be a a valid config file identifier returned by [fnc]$config.open[/fnc].[br] If the config file was opened as read-write (default), the changes will be stored - to disk. If the config was opened as read-only , changes will not be written.[br] + to disk. If the config was opened as read-only, changes will not be written.[br] If the <id> does not match any open config file, a warning is printed unless the -q switch is used.[br] @seealso: @@ -561,7 +561,7 @@ static bool config_kvs_cmd_close(KviKvsModuleCommandCall * c) Flushes the config file identified by <id>.[br] <id> must be a a valid config file identifier returned by [fnc]$config.open[/fnc].[br] If the config file was opened as read-write (default), the changes will be stored - to disk. If the config was opened as read-only ,an error is printed.[br] + to disk. If the config was opened as read-only, an error is printed.[br] If the <id> does not match any open config file, a warning is printed. @seealso: [module:config]Config module documentation[/module] @@ -691,7 +691,7 @@ static bool config_kvs_cmd_clearsection(KviKvsModuleCommandCall * c) <id> must be a valid config file id returned by [fnc]$config.open[/fnc]().[br] <key> and <value> can be any strings.[br] The <key>=<value> pair is written in the current section of the config file.[br] - If <key> already exists in the current section of the config , the corresponding value is replaced with <value>.[br] + If <key> already exists in the current section of the config, the corresponding value is replaced with <value>.[br] If <value> is an empty string, the <key> is simply removed from the current section.[br] If a section remains empty (with no keys) at file write time, that section will be removed.[br] The changes are NOT written to disk: you must call [cmd]config.flush[/cmd] or (better) [cmd]config.close[/cmd] @@ -792,25 +792,24 @@ static bool config_kvs_cmd_setsection(KviKvsModuleCommandCall * c) <key1>=<value1>[br] ....[br] [br] - Keys and values are plain text strings. Eventual newlines in values are encoded using + Keys and values are plain text strings - newlines in values are encoded using a simple hexadecimal notation.[br] The config files can be also edited by using any text editor.[br] The config module works on config files loaded in memory. For this reason, - you must first open a config file by the means of [fnc]$config.open[/fnc]().[br] - Once you open the file , if it exists on disk , its contents are loaded into memory - and you can access the data stored in it. If the file wasn't existing, and empty - memory config file is created.[br] + you must first open a config file by [fnc]$config.open[/fnc]() - if the file exists + on disk, its contents are loaded and you can access the data stored in it, otherwise + an empty config file is created in memory.[br] The config file is opened in read-write mode by default. You can also choose - the "read-only" method: a read-only config file is never flushed to disk (but you can - set the values in memory!).[br] - It is not a good idea to keep a config file open forever: a good approach - is to keep settings in memory variables and write them all at once when it comes to - write settings: you open the config file , write all your values and close the file.[br] + the "read-only" method - a read-only config file is never flushed to disk (but you + can still set values in memory!).[br] + It is not a good idea to keep a config file open forever. A better approach is to + keep settings in memory variables - when you want to write to disk, open the config + file, write all your values and then close the file.[br] You can obviously keep the config file open for some time but remember that - no change is written to the disk until [cmd]config.flush[/cmd] or [cmd]config.close[/cmd] is called.[br] + no changes are written to the disk until [cmd]config.flush[/cmd] or [cmd]config.close[/cmd] is called.[br] You write entries by using [cmd]config.write[/cmd] and read them by using [fnc]$config.read[/fnc]().[br] You can change the "current" config section by using [cmd]config.setsection[/cmd].[br] - Here comes a complete list of commands and functions exported by this module:[br] + The following lists all commands and functions exported by this module:[br] [fnc]$config.open[/fnc][br] [fnc]$config.read[/fnc][br] [fnc]$config.section[/fnc][br] diff --git a/src/modules/dcc/broker.cpp b/src/modules/dcc/broker.cpp index ff3b27dc3..9d3216127 100644 --- a/src/modules/dcc/broker.cpp +++ b/src/modules/dcc/broker.cpp @@ -245,7 +245,7 @@ void KviDccBroker::rsendExecute(KviDccDescriptor * dcc) szTag = dcc->szFileName; } - // now add a file offer , so he we will accept it automatically + // now add a file offer, so he we will accept it automatically // 120 secs is a reasonable timeout QString szMask = dcc->szNick; szMask += "!*@*"; diff --git a/src/modules/dcc/canvaswidget.h b/src/modules/dcc/canvaswidget.h index 84eee1c41..5616e1729 100644 --- a/src/modules/dcc/canvaswidget.h +++ b/src/modules/dcc/canvaswidget.h @@ -194,15 +194,15 @@ KviCanvasView(QCanvas * c,KviCanvasWidget * cw,QWidget * par); ~KviCanvasView(); public: - enum State { Idle , SelectOrigin }; + enum State { Idle, SelectOrigin }; enum ObjectType { - Rectangle , RichText , Line , Ellipse , Chord , Pie , - PolygonTriangle , PolygonRectangle , PolygonPentagon , + Rectangle, RichText, Line, Ellipse, Chord, Pie, + PolygonTriangle, PolygonRectangle, PolygonPentagon, PolygonHexagon }; enum DragMode { - None , All , Left , Right , Top , Bottom , LeftTop , RightTop , - LeftBottom , RightBottom , Scale , SinglePoint , Rotate + None, All, Left, Right, Top, Bottom, LeftTop, RightTop, + LeftBottom, RightBottom, Scale, SinglePoint, Rotate }; protected: KviCanvasWidget * m_pCanvasWidget; diff --git a/src/modules/dcc/chat.h b/src/modules/dcc/chat.h index b0d569a51..8d5fdde7c 100644 --- a/src/modules/dcc/chat.h +++ b/src/modules/dcc/chat.h @@ -53,8 +53,8 @@ protected: bool tryFlushOutBuffers(); // This should handle the incoming data buffer // must "eat" some data from data.buffer, memmove the remaining part - // to the beginning , kvi_realloc data.buffer and update data.iLen - // If bCritical is true , it should handle the whole data buffer + // to the beginning, kvi_realloc data.buffer and update data.iLen + // If bCritical is true, it should handle the whole data buffer // since the thread is going to die // It should return true if the handing was succesfull // or false if the thread should be stopped diff --git a/src/modules/dcc/descriptor.h b/src/modules/dcc/descriptor.h index 4d1ea6661..d799c8658 100644 --- a/src/modules/dcc/descriptor.h +++ b/src/modules/dcc/descriptor.h @@ -76,7 +76,7 @@ private: void copyFrom(const KviDccDescriptor &src); public: // Generic parameters - QString szType; // DCC protocol : CHAT , SCHAT , SEND , TSSEND.... + QString szType; // DCC protocol : CHAT, SCHAT, SEND, TSSEND.... bool bActive; // active or passive connection ? diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp index d6b0b073e..bee5618d5 100644 --- a/src/modules/dcc/dialogs.cpp +++ b/src/modules/dcc/dialogs.cpp @@ -57,7 +57,7 @@ void KviDccBox::forgetDescriptor() } KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,const QString &capt) -: QWidget(0) , KviDccBox(br,dcc) +: QWidget(0), KviDccBox(br,dcc) { setObjectName("dcc_accept_box"); //QVBoxLayout * vb = new QVBoxLayout(this,4,4); @@ -126,7 +126,7 @@ void KviDccAcceptBox::showEvent(QShowEvent *e) KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,bool bDisableResume) -: QWidget(0) , KviDccBox(br,dcc) +: QWidget(0), KviDccBox(br,dcc) { setObjectName("dcc_rename_box"); //QVBoxLayout * vb = new QVBoxLayout(this,4,4); diff --git a/src/modules/dcc/dialogs.h b/src/modules/dcc/dialogs.h index 1074fa656..06e314fde 100644 --- a/src/modules/dcc/dialogs.h +++ b/src/modules/dcc/dialogs.h @@ -43,7 +43,7 @@ public: }; -class KviDccAcceptBox : public QWidget , public KviDccBox +class KviDccAcceptBox : public QWidget, public KviDccBox { Q_OBJECT public: @@ -60,7 +60,7 @@ signals: void rejected(KviDccBox *,KviDccDescriptor *); }; -class KviDccRenameBox : public QWidget , public KviDccBox +class KviDccRenameBox : public QWidget, public KviDccBox { Q_OBJECT public: diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp index 2079f8614..7f0b94220 100644 --- a/src/modules/dcc/libkvidcc.cpp +++ b/src/modules/dcc/libkvidcc.cpp @@ -85,7 +85,7 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo if(!d->console()) { - // We don't need a console with -c and -n , otherwise we need it + // We don't need a console with -c and -n, otherwise we need it if(!(c->switches()->find('c',"connect") || c->switches()->find('n',"no-ctcp"))) { delete d; @@ -98,14 +98,14 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo if(!d->console()->isConnected()) { - // We don't need a connection with -c and -n , otherwise we need it + // We don't need a connection with -c and -n, otherwise we need it if(!(c->switches()->find('c',"connect") || c->switches()->find('n',"no-ctcp"))) { delete d; c->error(__tr2qs_ctx("You're not connected to a server (an active connection is required unless -c or -n are passed)","dcc")); return false; } else { - // -c or -n , grab a local nick from somewhere + // -c or -n, grab a local nick from somewhere d->szLocalNick = KVI_OPTION_STRING(KviOption_stringNickname1).trimmed(); if(d->szLocalNick.isEmpty())d->szLocalNick = KVI_DEFAULT_NICKNAME1; d->szLocalUser = __tr2qs_ctx("unknown","dcc"); // we can live without it @@ -1279,7 +1279,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) if(!d->console()) { - // We don't need a console with -c and -n , otherwise we need it + // We don't need a console with -c and -n, otherwise we need it if(!(c->hasSwitch('c') || c->hasSwitch('n')))return c->noIrcContext(); else d->console() = c->window()->frame()->firstConsole(); } @@ -1288,10 +1288,10 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) if(!d->console()->isConnected()) { - // We don't need a connection with -c and -n , otherwise we need it + // We don't need a connection with -c and -n, otherwise we need it if(!(c->hasSwitch('c') || c->hasSwitch('n')))return c->notConnectedToServer(); else { - // -c or -n , grab a local nick from somewhere + // -c or -n, grab a local nick from somewhere d->szLocalNick = KVI_OPTION_STRING(KviOption_stringNickname1).trimmed(); if(d->szLocalNick.isEmpty())d->szLocalNick = KVI_DEFAULT_NICKNAME1; d->szLocalUser = __tr("unknown"); // we can live without it diff --git a/src/modules/dcc/marshal.cpp b/src/modules/dcc/marshal.cpp index ccbdc36c9..6f2327c44 100644 --- a/src/modules/dcc/marshal.cpp +++ b/src/modules/dcc/marshal.cpp @@ -610,7 +610,7 @@ void KviDccMarshal::doSSLHandshake(int) int err = kvi_socket_error(); if(kvi_socket_recoverableError(err)) { - // can recover ? (EAGAIN , EINTR ?) + // can recover ? (EAGAIN, EINTR ?) m_pSn = new QSocketNotifier((int)m_fd,QSocketNotifier::Write); QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); m_pSn->setEnabled(true); diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp index e4aad108d..37ae55525 100644 --- a/src/modules/dcc/requests.cpp +++ b/src/modules/dcc/requests.cpp @@ -887,7 +887,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) if(KVI_OPTION_BOOL(KviOption_boolCantAcceptIncomingDccConnections)) { - // we have to use DCC RSEND , otherwise it will not work + // we have to use DCC RSEND, otherwise it will not work KviStr szSubproto("RSEND"); szSubproto.prepend(szExtensions); @@ -901,7 +901,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) // able to recognize the file. // Here we add another temporary offer with the right filename. - // now add a file offer , so he we will accept it automatically + // now add a file offer, so he we will accept it automatically // 120 secs is a reasonable timeout QString szMask; dcc->ctcpMsg->pSource->mask(szMask,KviIrcMask::NickUserHost); diff --git a/src/modules/dcc/send.h b/src/modules/dcc/send.h index a05ea2d0b..e47884b6d 100644 --- a/src/modules/dcc/send.h +++ b/src/modules/dcc/send.h @@ -168,7 +168,7 @@ protected slots: class KviDccFileTransfer : public KviFileTransfer, public KviDccMarshalOutputContext { - enum GeneralStatus { Connecting , Transferring , Success , Failure }; + enum GeneralStatus { Connecting, Transferring, Success, Failure }; Q_OBJECT public: KviDccFileTransfer(KviDccDescriptor * dcc); diff --git a/src/modules/dcc/voice.cpp b/src/modules/dcc/voice.cpp index 283ae4324..c46eb1f81 100644 --- a/src/modules/dcc/voice.cpp +++ b/src/modules/dcc/voice.cpp @@ -83,7 +83,7 @@ extern KviDccBroker * g_pDccBroker; //#define KVI_AUDIO_DEVICE "/dev/dsp" -// 32 fragments , 512 bytes +// 32 fragments, 512 bytes #define KVI_SNDCTL_FRAG_SIZE 0x00B00009 #define KVI_FRAGMENT_SIZE_IN_BYTES 512 #define KVI_FORMAT AFMT_S16_LE @@ -391,7 +391,7 @@ bool KviDccVoiceThread::soundStep() // m_uSleepTime += 100; // sleep for a while //} } else { - // hmmmm....playing , but nothing to write , possible underrun or EOF + // hmmmm....playing, but nothing to write, possible underrun or EOF // a nice idea would be to use SNDCTL_DSP_GETODELAY here... // but it appears to be broken on some audio devices if(ioctl(m_soundFd,SNDCTL_DSP_GETOSPACE,&info) < 0)info.fragstotal = info.fragments; // dummy...but what should we do ? @@ -407,12 +407,12 @@ bool KviDccVoiceThread::soundStep() { if(m_inSignalBuffer.size() >= m_pOpt->iPreBufferSize) { - // yep...stuff to play... open the soundcard , if possible + // yep...stuff to play... open the soundcard, if possible startPlaying(); m_iLastSignalBufferSize = m_inSignalBuffer.size(); } else { - // have stuff to play , but it's not enough to fill the pre-buffer + // have stuff to play, but it's not enough to fill the pre-buffer // struct timeval tv; gettimeofday(&tv,0); diff --git a/src/modules/dcc/window.h b/src/modules/dcc/window.h index 2b51d8c3c..0b85ced3d 100644 --- a/src/modules/dcc/window.h +++ b/src/modules/dcc/window.h @@ -30,7 +30,7 @@ #include "kvi_window.h" class KviDccThread; -class KviDccWindow : public KviWindow , public KviDccMarshalOutputContext +class KviDccWindow : public KviWindow, public KviDccMarshalOutputContext { Q_OBJECT public: diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp index aeb97f87c..8c4f91a70 100644 --- a/src/modules/dialog/libkvidialog.cpp +++ b/src/modules/dialog/libkvidialog.cpp @@ -129,12 +129,12 @@ void KviKvsCallbackMessageBox::done(int code) <callback_command> } @description: - Shows a message dialog box with the specified <caption> , <message_text> , <icon> and + Shows a message dialog box with the specified <caption>, <message_text>, <icon> and buttons.[br] <caption> is a text string that will appear in the caption of the dialog box.[br] <message_text> is a text string that will appear in the dialog box and can contain HTML formatting.[br] <icon> is an [doc:image_id]image identifier[/doc] that defines an icon to be placed in the dialog box. - <icon> can be a relative or absolute path to an image file , a signed number (in that case it defines + <icon> can be a relative or absolute path to an image file, a signed number (in that case it defines an internal KVIrc image) or one of the special strings "critical", "information" and "warning".[br] <button0> is the text of the first button (on the left).[br] <button1> is the text of the second button (if empty or not given at all, only one button will appear in the dialog).[br] @@ -146,10 +146,10 @@ void KviKvsCallbackMessageBox::done(int code) to the <callback_command> as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: it will appear above its parent widget and block its input until it's closed.[br] - Once the dialog has been shown , the user will click one of the buttons. At this point the dialog + Once the dialog has been shown, the user will click one of the buttons. At this point the dialog is hidden and the <callback_command> is executed passing the number of the button clicked - as $0 and the magic parameters as positional parameters $1 , $2 , $3....[br] - Please note that if the user closes the window with the window manager close button , + as $0 and the magic parameters as positional parameters $1, $2, $3....[br] + Please note that if the user closes the window with the window manager close button, the action is interpreted as a button2 click (that is usually sth as "Cancel").[br] @examples: [example] @@ -404,7 +404,7 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e) !sw: -m | --multiline Input multiline text instead of single line @description: - Shows a text input dialog box with the specified <caption> , <info_text> , <icon> and + Shows a text input dialog box with the specified <caption>, <info_text>, <icon> and buttons.[br] <caption> is a text string that will appear in the caption of the dialog box.[br] <info_text> is a fixed text string that will appear in the dialog box and can contain HTML formatting.[br] @@ -413,20 +413,20 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e) <button2> is the text of the third button (if empty or not given, only two buttons will appear in the dialog).[br] If one of the text strings starts with a "default=" prefix then the button is assumed to be the default button of the dialog and will be also activated when the user presses enter. - If the -m switch is used , the dialog will be a multi-line text input, otherwise the user will be able to + If the -m switch is used, the dialog will be a multi-line text input, otherwise the user will be able to input only a single line of text.[br] - If the -d switch is used , the initial text input value is set to <default text>.[br] - If the -i switch is used , the dialog displays also the icon <icon> , just on the left ot the <info_text>[br] + If the -d switch is used, the initial text input value is set to <default text>.[br] + If the -i switch is used, the dialog displays also the icon <icon>, just on the left ot the <info_text>[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: it will appear above its parent widget and block its input until it's closed.[br] In that case <icon> is an [doc:image_id]image identifier[/doc] (can be a relative or absolute path to an image file or a signed number (in that case it defines an internal KVIrc image).[br] <magic1>,<magic2>... are the magic parameters: evaluated at dialog.textinput call time and passed to the <callback_command> as positional parameters.[br] - Once the dialog has been shown , the user will click one of the buttons. At this point the dialog + Once the dialog has been shown, the user will click one of the buttons. At this point the dialog is hidden and the <callback_command> is executed passing the text input value in $1, the number of the button clicked - as $0, and the magic parameters as positional parameters $2 , $3 , $4....[br] - Please note that if the user closes the window with the window manager close button , + as $0, and the magic parameters as positional parameters $2, $3, $4....[br] + Please note that if the user closes the window with the window manager close button, the action is interpreted as a button2 click (that is usually sth as "Cancel").[br] @examples: [example] @@ -545,8 +545,8 @@ void KviKvsCallbackFileDialog::done(int code) <callback_command> } @description: - Shows an openfile dialog box with the specified <caption> , <initial_selection> , and <file_filter>.[br] - <mode> can be "open" , "openm" , "save" or "dir":[br] + Shows an openfile dialog box with the specified <caption>, <initial_selection>, and <file_filter>.[br] + <mode> can be "open", "openm", "save" or "dir":[br] "open" causes the dialog to return an existing file[br] "openm" is similar to open but allows returning multiple files as a comma separated list[br] "save" causes the dialog to return any file name (no overwrite confirmation is built in the dialog!)[br] @@ -562,9 +562,9 @@ void KviKvsCallbackFileDialog::done(int code) to the <callback_command> as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: it will appear above its parent widget and block its input until it's closed.[br] - Once the dialog has been shown , the user will select an EXISTING file and click either + Once the dialog has been shown, the user will select an EXISTING file and click either Ok or Cancel. At this point the dialog is hidden and the <callback_command> is executed passing the selected file(s) as $0 - and the magic parameters as positional parameters $1 , $2 , $3....[br] + and the magic parameters as positional parameters $1, $2, $3....[br] If the user clicks "Cancel" or does not select any file the positional parameter $0 will be empty.[br] @examples: [example] @@ -679,9 +679,9 @@ void KviKvsCallbackImageDialog::done(int code) to the <callback_command> as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: it will appear above its parent widget and block its input until it's closed.[br] - Once the dialog has been shown , the user will select an EXISTING file and click either + Once the dialog has been shown, the user will select an EXISTING file and click either Ok or Cancel. At this point the dialog is hidden and the <callback_command> is executed passing the selected file(s) as $0 - and the magic parameters as positional parameters $1 , $2 , $3....[br] + and the magic parameters as positional parameters $1, $2, $3....[br] If the user clicks "Cancel" or does not select any image the positional parameter $0 will be empty.[br] @examples: [example] @@ -827,7 +827,7 @@ static bool dialog_module_fnc_textline(KviModule *m,KviCommand *c,KviParameterLi This is actually confusing: the control IS in the script snippet but while the dialog is open the whole world can change: you can return from the dialog call and discover that the server connection no longer exists and the application is about to quit.[br] - This may happen even with non-blocking dialogs ,but in non-blocking mode you have + This may happen even with non-blocking dialogs,but in non-blocking mode you have a way to handle this event. Consider the following snippet of code:[br] [example] echo My name is $? @@ -838,7 +838,7 @@ static bool dialog_module_fnc_textline(KviModule *m,KviCommand *c,KviParameterLi in the executable to handle all these situations but that would be really too expensive).[br] With object scripting this is actually dangerous: you might use a blocking dialog in an object signal handler and when returning discover that this object has been deleted! - (The example refers to a simple object , but think about a complex hierarchy of objects + (The example refers to a simple object, but think about a complex hierarchy of objects where one random gets deleted...).[br] This is why the dialogs in KVIrc are non-blocking :)[br] That's REAL programming. @@ -876,9 +876,9 @@ static bool dialog_module_can_unload(KviModule *) KVIRC_MODULE( "KVIrc script dialogs", "4.0.0", - "Szymon Stefanek <pragma at kvirc dot net>" , + "Szymon Stefanek <pragma at kvirc dot net>", "Adds the /dialog.* commands functionality\n", - dialog_module_init , + dialog_module_init, dialog_module_can_unload, 0, dialog_module_cleanup, diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index 3ee1ef1be..d4889f1ea 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -97,8 +97,8 @@ Overwrites the file even if it already exists. @description: Makes a copy of the <source> file as <destination>.[br] - If the [-o] switch is used , the <destination> file is overwritten , if already exists.[br] - With no [-o] switch , this command does not overwrite files.[br] + If the [-o] switch is used, the <destination> file is overwritten, if already exists.[br] + With no [-o] switch, this command does not overwrite files.[br] The destination path must be already existing: if you want to ensure this, use [fnc]$file.mkdir[/fnc] first.[br] The paths (<source> and <destination>) are adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it *should* be automatically @@ -259,7 +259,7 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) @description: Renames a file from <oldname> to <newname>.[br] This command can also rename directories.[br] - If the <newname> file already exists , this command fails.[br] + If the <newname> file already exists, this command fails.[br] The paths (<oldname> and <newname>) are adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it *should* be automatically guaranteed.Just use UNIX style paths for them.[br] @@ -334,7 +334,7 @@ static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) Suppresses any warning message @description: Removes the file <name>.[br] - -q suppresses any warning message (about non existing file , for example).[br] + -q suppresses any warning message (about non existing file, for example).[br] The path is adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it *should* be automatically guaranteed. Just use an UNIX style path.[br] @@ -374,7 +374,7 @@ static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) @description: Removes the directory <name>.[br] The directory must be empty for this command to success.[br] - -q suppresses any warning message (about non existing directory , for example).[br] + -q suppresses any warning message (about non existing directory, for example).[br] The path is adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it *should* be automatically guaranteed. Just use an UNIX style path.[br] @@ -434,7 +434,7 @@ static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) @syntax: <string> $file.type(<filename:string>) @description: - Returns "f" if the <filename> points to a real file , "d" if <filename> + Returns "f" if the <filename> points to a real file, "d" if <filename> is the name of a directory or "l" if it is a symbolic link.[br] The <filename> should be an unix-style file path and is adjusted according to the system that KVIrc is running on.[br] */ @@ -464,7 +464,7 @@ static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) <integer> $file.size(<filename:string>) @description: Returns the size of the file pointed by <filename>.[br] - If the file does not exist , this function returns 0.[br] + If the file does not exist, this function returns 0.[br] The <filename> should be an unix-style file path and is adjusted according to the system that KVIrc is running on.[br] */ static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) @@ -540,7 +540,7 @@ static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) <string> $file.fixpath(<filename:string>) @description: Returns the <filename> adjusted to match the current operating - system file path conventions.[br] This means that on UNIX , a path like "C:\folder\file.mp3" + system file path conventions.[br] This means that on UNIX, a path like "C:\folder\file.mp3" will be returned as "/folder/file.mp3" and vice-versa.[br] There is a minor problem with unix paths converted to the windows system: unix has no "drive" concept thus the unix paths do not contain a drive. KVIrc will @@ -574,7 +574,7 @@ static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) <string> $file.ps() @description: Returns the file path separator for the current operating system.[br] - On windows , '\' is returned , on UNIX , '/'.[br] + On windows, '\' is returned, on UNIX, '/'.[br] @seealso: [fnc]$file.fixpath[/fnc] */ @@ -596,7 +596,7 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) <array> $file.ls(<directory:string>,[<flags:string>[,<namefilter:string>]]) @description: Returns the listing of the specified directory as an array.[br] - The <directory> should be an unix-style file path and is adjusted according to the system that KVIrc is running on.[br] + The <directory> should be a unix-style file path and is adjusted according to the system that KVIrc is running on.[br] <flags> may be a combination of the following characters:[br] d: list directories[br] f: list files[br] @@ -612,8 +612,8 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) z: put the directories first, then the files[br] k: invert sort order[br] i: case insensitive sort[br] - If <flags> is empty then a default of 'dfrwxhs'.[br] - If none of r,w,x is set then KVIrc sets all of them by default.[br] + If <flags> is empty then a default of 'dfrwxhs' is set.[br] + If none of the r,w,x flags are set then KVIrc sets all of them by default.[br] If <namefilter> is passed then it is interpreted as a wildcard string that must match the entries to be returned.[br] @example: @@ -700,13 +700,13 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) @description: Reads at most <size> bytes of the file pointed by <filename>.[br] <size> is an upper limit but may be not reached if the real file is smaller.[br] - The data read is returned as a string , so if the file contains binary data, + The data read is returned as a string, so if the file contains binary data, expect strange results.[br] If <size> is not specified, then KVIrc tries to read the whole file up to the 1 MiB limit (so if you want to read a file that is bigger thatn 1 MiB then you MUST specify the <size>).[br] WARNING: always check the file size before attemting to read a whole file... reading a CDROM iso image may sit down your system :) (and will prolly crash while - allocating memory , before attempting to read anything)[br] + allocating memory, before attempting to read anything)[br] An empty string is returned if a serious error occures.[br] The <filename> is adjusted according to the system that KVIrc is running on.[br] Flags are actually limited to the single letter 'l'. By default the file @@ -963,13 +963,13 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) @description: Returns the path to the KVIrc local data directory.[br] The KVIrc local data directory is always writeable and contains - the various subdirectories that KVIrc uses internally: audio , avatars , - config , help , incoming , log , modules , msgcolors and pics.[br] - If <relative_path> is passed , then it is appended at the end of the directory - to form a complete filepath.[br] + the various subdirectories that KVIrc uses internally: audio, avatars, + config, help, incoming, log, modules, msgcolors and pics.[br] + If <relative_path> is passed, then it is appended to the directory path to + form a complete filepath.[br] The path is adjusted to contain single separators suitable for the platform - that KVIrc is atually running on (thus you not need to care about path - separators in the <relative_path> , KVIrc will adjust them).[br] + that KVIrc is atually running on (thus you do not need to care about path + separators in the <relative_path>, KVIrc will adjust them).[br] @examples: [example] echo KVIrc looks for pictures in $file.localdir(pics) @@ -1002,11 +1002,11 @@ static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) <string> $file.homedir([relative_path:string]) @description: Returns the user's HOME directory path.[br] - If <relative_path> is passed , then it is appended at the end of the directory - to form a complete filepath.[br] + If <relative_path> is passed, then it is appendedto the directory path to + form a complete filepath.[br] The path is adjusted to contain single separators suitable for the platform - that KVIrc is atually running on (thus you not need to care about path - separators in the <relative_path> , KVIrc will adjust them).[br] + that KVIrc is atually running on (thus you do not need to care about path + separators in the <relative_path>, KVIrc will adjust them).[br] */ static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) { @@ -1036,11 +1036,11 @@ static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) $file.rootdir @description: Returns the system's root directory (/ on UNIX and C:/ on Windows).[br] - If <relative_path> is passed , then it is appended at the end of the directory + If <relative_path> is passed, then it is appended at the end of the directory to form a complete filepath.[br] The path is adjusted to contain single separators suitable for the platform that KVIrc is atually running on (thus you not need to care about path - separators in the <relative_path> , KVIrc will adjust them).[br] + separators in the <relative_path>, KVIrc will adjust them).[br] */ static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) { @@ -1069,11 +1069,11 @@ static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) <string> $file.cwd([relative_path:string]) @description: Returns the current working directory.[br] - If <relative_path> is passed , then it is appended at the end of the directory + If <relative_path> is passed, then it is appended at the end of the directory to form a complete filepath.[br] The path is adjusted to contain single separators suitable for the platform - that KVIrc is atually running on (thus you not need to care about path - separators in the <relative_path> , KVIrc will adjust them).[br] + that KVIrc is actually running on (thus you do not need to care about path + separators in the <relative_path>, KVIrc will adjust them).[br] */ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) { @@ -1103,14 +1103,14 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) $file.globaldir @description: Returns the path to the KVIrc global data directory.[br] - The KVIrc local data directory is always readable but usually not writeable and contains - the various subdirectories that KVIrc uses internally: audio , avatars , - config , help , incoming , log , modules , msgcolors and pics.[br] - If <relative_path> is passed , then it is appended at the end of the directory - to form a complete filepath.[br] + The KVIrc local data directory is always readable (but usually not writeable) and contains + the various subdirectories that KVIrc uses internally: audio, avatars, + config, help, incoming, log, modules, msgcolors and pics.[br] + If <relative_path> is passed, then it is appended to the directory path to + form a complete filepath.[br] The path is adjusted to contain single separators suitable for the platform - that KVIrc is atually running on (thus you not need to care about path - separators in the <relative_path> , KVIrc will adjust them).[br] + that KVIrc is atually running on (thus you do not need to care about path + separators in the <relative_path>, KVIrc will adjust them).[br] @examples: [example] echo KVIrc looks for pictures in $file.globaldir(pics) @@ -1201,10 +1201,10 @@ static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c) @syntax: <string> $file.digest(<file:string>[,<algorithm:string>]) @description: - Calculates digest for the file identified by the given string using algorithm + Calculates a digest for the file identified by the given string using the algorithm passed as 2nd argument. - Currently supported: md5, md4, md2, sha1, mdc2, ripemd160, dss1 - Default is md5. Requires OpenSSL support or (better) Crypto++, but offers a + Currently supported: md5 (default), md4, md2, sha1, mdc2, ripemd160 and dss1. + Requires OpenSSL support or (better) Crypto++, but offers a minimal set of hashes in any case. */ static bool file_kvs_fnc_digest(KviKvsModuleFunctionCall * c) diff --git a/src/modules/filetransferwindow/filetransferwindow.cpp b/src/modules/filetransferwindow/filetransferwindow.cpp index 6fb1ee2de..529b802ce 100644 --- a/src/modules/filetransferwindow/filetransferwindow.cpp +++ b/src/modules/filetransferwindow/filetransferwindow.cpp @@ -238,7 +238,7 @@ QSize KviFileTransferItemDelegate::sizeHint(const QStyleOptionViewItem &, const } KviFileTransferWindow::KviFileTransferWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm) -: KviWindow(KVI_WINDOW_TYPE_TOOL,lpFrm,"file transfer window",0) , KviModuleExtension(d) +: KviWindow(KVI_WINDOW_TYPE_TOOL,lpFrm,"file transfer window",0), KviModuleExtension(d) { g_pFileTransferWindow = this; setAutoFillBackground(false); diff --git a/src/modules/filetransferwindow/filetransferwindow.h b/src/modules/filetransferwindow/filetransferwindow.h index fa9934880..47fc43b98 100644 --- a/src/modules/filetransferwindow/filetransferwindow.h +++ b/src/modules/filetransferwindow/filetransferwindow.h @@ -85,7 +85,7 @@ public: void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; }; -class KviFileTransferWindow : public KviWindow , public KviModuleExtension +class KviFileTransferWindow : public KviWindow, public KviModuleExtension { friend class KviFileTransferItem; friend class KviFileTransferItemDelegate; diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp index b12edb41d..169531e86 100644 --- a/src/modules/help/libkvihelp.cpp +++ b/src/modules/help/libkvihelp.cpp @@ -54,7 +54,7 @@ KviPointerList<KviHelpWindow> * g_pHelpWindowList = 0; Finds the first available help browser in the current frame then opens the specified [document]. If no [document] is specified it the documentation index is shown. - If no help browser is available , a new one is created. + If no help browser is available, a new one is created. [document] can be an absolute path or a relative one: in this case the document is searched in the KVIrc documentation directory.[br] If no document has been found using absolute and relative paths, diff --git a/src/modules/iograph/libkviiograph.h b/src/modules/iograph/libkviiograph.h index d410fada5..55aeb768d 100644 --- a/src/modules/iograph/libkviiograph.h +++ b/src/modules/iograph/libkviiograph.h @@ -53,7 +53,7 @@ protected: virtual void paintEvent (QPaintEvent *e); }; -class KviIOGraphWindow : public KviWindow , public KviModuleExtension +class KviIOGraphWindow : public KviWindow, public KviModuleExtension { Q_OBJECT public: diff --git a/src/modules/lamerizer/libkvilamerizer.cpp b/src/modules/lamerizer/libkvilamerizer.cpp index 4ebd0aa5b..136537efc 100644 --- a/src/modules/lamerizer/libkvilamerizer.cpp +++ b/src/modules/lamerizer/libkvilamerizer.cpp @@ -266,9 +266,9 @@ static bool lamerizer_module_can_unload(KviModule *) KVIRC_MODULE( "Lamerizer crypt engine", "4.0.0", - "Szymon Stefanek <pragma at kvirc dot net> \n Jan Wagner <istari@kvirc.net>" , + "Szymon Stefanek <pragma at kvirc dot net> \n Jan Wagner <istari@kvirc.net>", "Exports the lamerizer text transformation engine", - lamerizer_module_init , + lamerizer_module_init, lamerizer_module_can_unload, 0, lamerizer_module_cleanup, diff --git a/src/modules/links/linkswindow.cpp b/src/modules/links/linkswindow.cpp index eaf40beda..f08ae553f 100644 --- a/src/modules/links/linkswindow.cpp +++ b/src/modules/links/linkswindow.cpp @@ -46,7 +46,7 @@ extern KviPointerList<KviLinksWindow> * g_pLinksWindowList; KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole) -: KviWindow(KVI_WINDOW_TYPE_LINKS,lpFrm,"links",lpConsole) , KviExternalServerDataParser() +: KviWindow(KVI_WINDOW_TYPE_LINKS,lpFrm,"links",lpConsole), KviExternalServerDataParser() { g_pLinksWindowList->append(this); diff --git a/src/modules/logview/logviewmdiwindow.h b/src/modules/logview/logviewmdiwindow.h index 54a63ef9d..5ee9fa36c 100644 --- a/src/modules/logview/logviewmdiwindow.h +++ b/src/modules/logview/logviewmdiwindow.h @@ -85,7 +85,7 @@ signals: void rightButtonPressed(QTreeWidgetItem *,QPoint); }; -class KviLogViewMDIWindow : public KviWindow , public KviModuleExtension +class KviLogViewMDIWindow : public KviWindow, public KviModuleExtension { Q_OBJECT public: diff --git a/src/modules/mediaplayer/libkvimediaplayer.cpp b/src/modules/mediaplayer/libkvimediaplayer.cpp index bb4d3c623..9f519cab8 100644 --- a/src/modules/mediaplayer/libkvimediaplayer.cpp +++ b/src/modules/mediaplayer/libkvimediaplayer.cpp @@ -543,7 +543,7 @@ MP_KVS_FUNCTION(playerList) @description: Plays the media specified by the <mrl> on the currently selected media player interface. <mrl> is a standard Media Resource - Locator. Examples of such locators are: 'file:///home/myfile.mp3' , + Locator. Examples of such locators are: 'file:///home/myfile.mp3', 'http://streaming.server.top:123', 'dvd:// or dvb://channelname'. Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @@ -741,7 +741,7 @@ MP_KVS_SIMPLE_COMMAND(mute,mute) @description: Returns the mrl of the media currently played by the selected media player interface. The mrl is a standard Media Resource Locator. - Examples of such locators are: 'file:///home/myfile.mp3' , + Examples of such locators are: 'file:///home/myfile.mp3', 'http://streaming.server.top:123', 'dvd:// or dvb://channelname'. This means that the returned string may NOT refer to a local file: it refers to the local file only if the 'file://' prefix is found ([fnc]$mediaplayer.localFile()[/fnc] diff --git a/src/modules/mediaplayer/mp_interface.h b/src/modules/mediaplayer/mp_interface.h index ca0615f3a..87631b2d6 100644 --- a/src/modules/mediaplayer/mp_interface.h +++ b/src/modules/mediaplayer/mp_interface.h @@ -78,7 +78,7 @@ public: // communication errors. virtual QString nowPlaying() = 0; // currently played media resource locator - // file://<filepath> for local files, dvb:// for dvb media , dvd:// for dvd's + // file://<filepath> for local files, dvb:// for dvb media, dvd:// for dvd's // http:// for audio streams etc... // empty if player is not playing (or in the tragic case that the player // can't determine the url). diff --git a/src/modules/mediaplayer/mp_mp3.cpp b/src/modules/mediaplayer/mp_mp3.cpp index 19ee2e0f2..60a66a5de 100644 --- a/src/modules/mediaplayer/mp_mp3.cpp +++ b/src/modules/mediaplayer/mp_mp3.cpp @@ -443,7 +443,7 @@ char *unpad(char *string) return string; } -bool scan_mp3_file(QString& ,mp3info * i) +bool scan_mp3_file(QString&,mp3info * i) { //memset(i,0,sizeof(mp3info)); resetmp3infoStruct(i); diff --git a/src/modules/mediaplayer/mp_mprisinterface.cpp b/src/modules/mediaplayer/mp_mprisinterface.cpp index 021b2b255..ce382b5a0 100644 --- a/src/modules/mediaplayer/mp_mprisinterface.cpp +++ b/src/modules/mediaplayer/mp_mprisinterface.cpp @@ -30,8 +30,8 @@ according to MPRIS 1.0, GetStatus returns struct of 4 integers. First integer: 0 = Playing, 1 = Paused, 2 = Stopped. - Second interger: 0 = Playing linearly , 1 = Playing randomly. - Third integer: 0 = Go to the next element once the current has finished playing , 1 = Repeat the current element + Second interger: 0 = Playing linearly, 1 = Playing randomly. + Third integer: 0 = Go to the next element once the current has finished playing, 1 = Repeat the current element Fourth integer: 0 = Stop playing once the last element has been played, 1 = Never give up playing */ @@ -487,7 +487,7 @@ MP_IMPLEMENT_DESCRIPTOR( __tr2qs_ctx( "An interface to Qmmp.\n" \ "Download it from http://qmmp.ylsoftware.com\n" - , + , "mediaplayer" ) ) diff --git a/src/modules/mediaplayer/winamp.cpp b/src/modules/mediaplayer/winamp.cpp index 81bbdeda6..60bcb29e7 100644 --- a/src/modules/mediaplayer/winamp.cpp +++ b/src/modules/mediaplayer/winamp.cpp @@ -30,7 +30,7 @@ // This is a winamp-kvirc interface plugin // -// This stuff is compiled only on windows , as a separate dll module +// This stuff is compiled only on windows, as a separate dll module typedef struct diff --git a/src/modules/notifier/notifiersettings.h b/src/modules/notifier/notifiersettings.h index 621444fb0..1a0a29e42 100644 --- a/src/modules/notifier/notifiersettings.h +++ b/src/modules/notifier/notifiersettings.h @@ -60,7 +60,7 @@ #define m_mac_bkgColor QColor(236,233,216) // Light-brown color of notifier background widget -enum State { Hidden, Showing, Visible, Hiding , FocusingOff, FocusingOn }; +enum State { Hidden, Showing, Visible, Hiding, FocusingOff, FocusingOn }; enum TabState { Normal, Highlighted, Changed }; #endif //_NOTIFIER_SETTINGS_H_ diff --git a/src/modules/objects/class_buttongroup.h b/src/modules/objects/class_buttongroup.h index 1028174ba..10ce2722c 100644 --- a/src/modules/objects/class_buttongroup.h +++ b/src/modules/objects/class_buttongroup.h @@ -37,7 +37,7 @@ public: protected: QButtonGroup *m_pButtonGroup; int m_iId; - KviPointerHashTable<int ,KviKvsObject > btnDict; + KviPointerHashTable<int, KviKvsObject > btnDict; bool addButton(KviKvsObjectFunctionCall *c); bool checkedButton(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_ftp.cpp b/src/modules/objects/class_ftp.cpp index bba0fd5c0..9d1c594ac 100644 --- a/src/modules/objects/class_ftp.cpp +++ b/src/modules/objects/class_ftp.cpp @@ -298,7 +298,7 @@ void KviKvsObject_ftp::slotReadyRead () { } -void KviKvsObject_ftp::slotRawCommandReply (int , const QString & ) +void KviKvsObject_ftp::slotRawCommandReply (int, const QString & ) { } diff --git a/src/modules/objects/class_groupbox.cpp b/src/modules/objects/class_groupbox.cpp index 644f8fa58..d51603fa6 100644 --- a/src/modules/objects/class_groupbox.cpp +++ b/src/modules/objects/class_groupbox.cpp @@ -32,7 +32,7 @@ #include "kvi_iconmanager.h" -// Tables used in $setAlignment , $alignment and in $setOrientation & $orientation +// Tables used in $setAlignment, $alignment and in $setOrientation & $orientation const char * const align_tbl[] = { "Left", diff --git a/src/modules/objects/class_layout.cpp b/src/modules/objects/class_layout.cpp index b9f9a4122..2c402942a 100644 --- a/src/modules/objects/class_layout.cpp +++ b/src/modules/objects/class_layout.cpp @@ -68,7 +68,7 @@ const int align_cod[] = { [class]object[/class] @description: The layout is a geometry management tool for child widgets. - You create a layout , give it some widgets to manage and it will layout them + You create a layout, give it some widgets to manage and it will layout them automatically.[br] The parent of the layout must be the widget for which child widget geometries have to be managed. A layout is a grid of NxM cells in which you insert child widgets with [classfnc:layout]$addWidget[/classfnc]().[br] diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp index 01ffd1c6b..88984b1ac 100644 --- a/src/modules/objects/class_multilineedit.cpp +++ b/src/modules/objects/class_multilineedit.cpp @@ -185,7 +185,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_textedit,"multilineedit","widget") KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"paste", functionPaste) //->Set Style - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setFamily" , functionsetFamily) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setFamily", functionsetFamily) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setItalic", functionsetItalic) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setBold", functionsetBold) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setUnderline", functionsetUnderline) @@ -209,18 +209,18 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_textedit,"multilineedit","widget") //->Text color & others KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setText", functionsetText) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setColor", functionsetColor) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setModified" , functionsetModified) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setModified", functionsetModified) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setPointSize", functionsetPointSize) KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setReadOnly",functionSetReadOnly) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setTextFormat" , functionsetTextFormat) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"textFormat" , functiontextFormat) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"loadFile" , functionloadFile); - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setAlignment" , functionsetAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setTextFormat", functionsetTextFormat) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"textFormat", functiontextFormat) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"loadFile", functionloadFile); + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"setAlignment", functionsetAlignment) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"lines" ,functionlines) - KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"selectAll" ,functionselectAll) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"lines", functionlines) + KVSO_REGISTER_HANDLER(KviKvsObject_textedit,"selectAll", functionselectAll) KVSO_END_REGISTERCLASS(KviKvsObject_textedit) @@ -440,7 +440,7 @@ bool KviKvsObject_textedit::functionsetItalic(KviKvsObjectFunctionCall * c) return true; } -//-->Returns Italic , Bold, Underline. +//-->Returns Italic, Bold, Underline. bool KviKvsObject_textedit::functionbold(KviKvsObjectFunctionCall * c) { if(widget()) diff --git a/src/modules/objects/class_socket.cpp b/src/modules/objects/class_socket.cpp index 0f2aa6e13..3d40cf1f2 100644 --- a/src/modules/objects/class_socket.cpp +++ b/src/modules/objects/class_socket.cpp @@ -66,7 +66,7 @@ @description: This class provides a standard TCP/IP socket functionality.[br] It can be used either for connecting to a remote host or to listening for incoming connections.[br] - If the KVIrc executable has been compiled with the IPV6 protocol support , this socket also supports it.[br] + If the KVIrc executable has been compiled with the IPV6 protocol support, this socket also supports it.[br] @functions: !fn: $status() Returns the status of the socket :[br] @@ -90,27 +90,27 @@ <host> can be a numeric internet address (either Ipv4 or Ipv6 (if supported)) or a hostname.[br] If a hostname is used, a DNS lookup is performed (the socket enters the "dns call" state).[br] This function returns 1 if the connect attempt can be successfully initiated, - 0 otherwise.[br] In fact , this function returns 0 only if the supplied <port> parameter + 0 otherwise.[br] In fact, this function returns 0 only if the supplied <port> parameter is invalid or the socket is in an incoherent state (already connected or listening): for a newly created socket and with a valid <port> number you can safely ignore the return value.[br] Please note that the connection is asynchronous: when this function returns the socket is NOT connected: it has just initiated the connect attempt and you will be notified of the attempt result by an asynchronous event call: - in case of failure , $connectFailedEvent() will be called , in case of - succes , $connectEvent() will be called. + in case of failure, $connectFailedEvent() will be called, in case of + succes, $connectEvent() will be called. !fn: $listen([<port>[,<interface>[,<force_ipv6>]]]) Attempts to listen on the specified <port> and <interface>.[br] - If <port> is not passed it is assumed to be 0 , if <interface> is not passed , it is assumed to be + If <port> is not passed it is assumed to be 0, if <interface> is not passed, it is assumed to be "any interface" (INADDR_ANY).[br] Port 0 means that the kernel should choose a "random" port to listen on.[br] - If the <interface> is recognized as IPV6 address , and IPV6 is supported , the socket listens + If the <interface> is recognized as IPV6 address, and IPV6 is supported, the socket listens in IPV6 mode. If <interface> is an empty string and <force_ipv6> is 1 the socket listens on "any ipv6 interface".[br] This function returns '1' in case of success and '0' in case of failure.[br] On some systems listening in the IPV6 namespace allows to accept also IPV4 connections (this includes linux but not windows afaik).[br] - When an incoming connection will arrive , $incomingConnectionEvent() will be called. + When an incoming connection will arrive, $incomingConnectionEvent() will be called. !fn: $accept(<socketId>) This function can be called only from inside $incomingConnectionEvent().[br] @@ -187,11 +187,11 @@ !fn: $localIp() Returns the IP address of the local end of this socket.[br] - The return value is meaningful only if the socket is in connected , listening or connecting state. + The return value is meaningful only if the socket is in connected, listening or connecting state. !fn: $localPort() Returns the port of the local end of this socket.[br] - The return value is meaningful only if the socket is in connected , listening or connecting state. + The return value is meaningful only if the socket is in connected, listening or connecting state. @examples: [example] diff --git a/src/modules/objects/class_sql.cpp b/src/modules/objects/class_sql.cpp index 9755cb020..6be4737b6 100644 --- a/src/modules/objects/class_sql.cpp +++ b/src/modules/objects/class_sql.cpp @@ -94,7 +94,7 @@ static void KviKvsSqlInstanceUnregister(KviKvsObject_sql *instance) !fn: $commit() Commit the transaction. !fn: $setCurrentQuery(<connection_name:string>) - Sets the query for the database connection <connection_name> , which has to be already connected, as current query. + Sets the query for the database connection <connection_name>, which has to be already connected, as current query. !fn: <connection_name:string> $currentQuery() Returns the name of the database connection for the current query, or an empty string if there aren't any initialized queries. !fn: $closeConnection(<connection_name:string>) diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index fb57c60c7..5a67a4e44 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -246,7 +246,7 @@ const char * const widgettypes_tbl[] = { Changes the widget's width to <width> and height to <height>. See also [classfnc]$setGeometry[/classfnc](). !fn: $isEnabled() - Returns '1' if the widget is enabled , '0' otherwise. + Returns '1' if the widget is enabled, '0' otherwise. See also [classfnc:widget]$setEnabled[/classfnc](). !fn: $setEnabled(<bool>) Sets the widget state to enabled or disabled if <bool> is 1 or 0 respectively. @@ -284,8 +284,8 @@ const char * const widgettypes_tbl[] = { widget is a toplevel one. !fn: $backgroundColor() Returns the background color of this widget in hexadecimal - html-like format. For example , for a black bacground you will get - the string "000000" , for a red one , "FF0000", for a white one + html-like format. For example, for a black bacground you will get + the string "000000", for a red one, "FF0000", for a white one "FFFFFF". See also [classfnc]$setBackgroundColor[/classfnc]() !fn: $setBackgroundColor(<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red>,[geen:integer],[blue:integer]) Sets the background color of this widget to <rgb_value>:valid values are: @@ -584,18 +584,18 @@ const char * const widgettypes_tbl[] = { // -// If you never call c->error() , c->warning() (your function never fails) +// If you never call c->error(), c->warning() (your function never fails) // and never call a function that can call c->error() or c->warning() // you can avoid ENTER_STACK_FRAME and c->leaveStackFrame() // Just return true. // c->error() should be called only in really critical situations // (we have to define better "critical situation") -// if possible , leave the things go after just a c->warning() +// if possible, leave the things go after just a c->warning() // // widget() will be never 0 in THIS class // but in derived classes WILL be - // ... now that I think about it , it + // ... now that I think about it, it // may happen that widget() will be zero here too: // If the Qt "physical" widget gets destroyed // by some external factor (for example when children @@ -609,7 +609,7 @@ const char * const widgettypes_tbl[] = { // as in a qtwrapper not yet wrapped or failed to wrap (so // qtwrapper::$wrap() returned '0' for example) // or after the widget has been destroyed... - // if widget() is 0 , the functions perform no actions + // if widget() is 0, the functions perform no actions // return no errors and results that have to be assumed // as invalid (this allows the minimum overhead: if widget() diff --git a/src/modules/objects/class_workspace.cpp b/src/modules/objects/class_workspace.cpp index 3eacf610b..39c3632c5 100644 --- a/src/modules/objects/class_workspace.cpp +++ b/src/modules/objects/class_workspace.cpp @@ -189,7 +189,7 @@ if (pWidgetDict) } KVSO_END_CONSTRUCTOR(KviKvsObject_workspace) -bool KviKvsObject_workspace::init(KviKvsRunTimeContext * ,KviKvsVariantList *) +bool KviKvsObject_workspace::init(KviKvsRunTimeContext *, KviKvsVariantList *) { SET_OBJECT(QMdiArea); return true; diff --git a/src/modules/options/instances.cpp b/src/modules/options/instances.cpp index 28294a3b1..2b158c984 100644 --- a/src/modules/options/instances.cpp +++ b/src/modules/options/instances.cpp @@ -665,7 +665,7 @@ KviOptionsInstanceManager::KviOptionsInstanceManager() { //qDebug("Instantiating"); - // Create the global widget dict : case sensitive , do not copy keys + // Create the global widget dict : case sensitive, do not copy keys m_pInstanceTree = new KviPointerList<KviOptionsWidgetInstanceEntry>; m_pInstanceTree->setAutoDelete(true); diff --git a/src/modules/options/libkvioptions.cpp b/src/modules/options/libkvioptions.cpp index f7ca1453c..e8ea29254 100644 --- a/src/modules/options/libkvioptions.cpp +++ b/src/modules/options/libkvioptions.cpp @@ -56,7 +56,7 @@ extern int g_iOptionWidgetInstances; @syntax: options.save @description: - Saves the options to disk; this includes aliases , popups , + Saves the options to disk; this includes aliases, popups, events and user preferences. */ @@ -79,7 +79,7 @@ static bool options_kvs_cmd_save(KviKvsModuleCommandCall *) options.dialog [-t] [options_group] @description: Shows the KVIrc options dialog for the specified options group. - If the [-t] switch is used , the dialog is opened as toplevel window, + If the [-t] switch is used, the dialog is opened as toplevel window, otherwise it is opened as part of the current frame window.[br] Valid values for [options_group] are "general" and "theme". If [options_group] is omitted, the option group "general" is assumed. diff --git a/src/modules/popupeditor/popupeditor.h b/src/modules/popupeditor/popupeditor.h index 67f2a90e1..102d321e3 100644 --- a/src/modules/popupeditor/popupeditor.h +++ b/src/modules/popupeditor/popupeditor.h @@ -42,7 +42,7 @@ class KviMenuTreeWidgetItem; class KviPopupTreeWidgetItem : public QTreeWidgetItem { public: - enum Type { Item , Menu , Separator , Label , Epilogue , Prologue , ExtMenu }; + enum Type { Item, Menu, Separator, Label, Epilogue, Prologue, ExtMenu }; public: KviPopupTreeWidgetItem(QTreeWidget * pTreeWidget,KviPopupTreeWidgetItem * after,Type t); KviPopupTreeWidgetItem(KviPopupTreeWidgetItem * parent,KviPopupTreeWidgetItem * after,Type t); diff --git a/src/modules/python/libkvipython.cpp b/src/modules/python/libkvipython.cpp index 2e37561de..21fa11ae2 100644 --- a/src/modules/python/libkvipython.cpp +++ b/src/modules/python/libkvipython.cpp @@ -18,7 +18,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //============================================================================= diff --git a/src/modules/pythoncore/kvircmodule.cpp b/src/modules/pythoncore/kvircmodule.cpp index 3bc3bf73f..06e478b75 100644 --- a/src/modules/pythoncore/kvircmodule.cpp +++ b/src/modules/pythoncore/kvircmodule.cpp @@ -18,7 +18,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //============================================================================= diff --git a/src/modules/pythoncore/kvircmodule.h b/src/modules/pythoncore/kvircmodule.h index d0ed61164..76ad92ca0 100644 --- a/src/modules/pythoncore/kvircmodule.h +++ b/src/modules/pythoncore/kvircmodule.h @@ -20,7 +20,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //============================================================================= diff --git a/src/modules/pythoncore/libkvipythoncore.cpp b/src/modules/pythoncore/libkvipythoncore.cpp index 64046b136..1acf97513 100644 --- a/src/modules/pythoncore/libkvipythoncore.cpp +++ b/src/modules/pythoncore/libkvipythoncore.cpp @@ -18,7 +18,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //============================================================================= diff --git a/src/modules/raweditor/raweditor.h b/src/modules/raweditor/raweditor.h index 3c0b7aa8f..f2bc47ccd 100644 --- a/src/modules/raweditor/raweditor.h +++ b/src/modules/raweditor/raweditor.h @@ -67,7 +67,7 @@ class KviRawHandlerTreeWidgetItem : public QTreeWidgetItem { public: KviRawHandlerTreeWidgetItem(QTreeWidgetItem * par,const QString & name,const QString & buffer,bool bEnabled) - : QTreeWidgetItem(par), m_szBuffer(buffer) , m_bEnabled(bEnabled) + : QTreeWidgetItem(par), m_szBuffer(buffer), m_bEnabled(bEnabled) { setText(0,name); setEnabled(bEnabled); diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index dd02fac8b..7c088c7ec 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -371,7 +371,7 @@ void KviRegisteredUsersDialog::itemPressed(QTreeWidgetItem *it,int c) szMask.append(tmp); } } - // if the nickname list is still empty , build a dummy nick to notify + // if the nickname list is still empty, build a dummy nick to notify if(szMask.isEmpty()) { szMask = i->user()->name(); diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index aa3c626ca..0d11c1af3 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -554,7 +554,7 @@ void KviRegisteredUserEntryDialog::notifyCheckClicked(bool bChecked) szMask.append(tmp); } } - // if the nickname list is still empty , build a dummy nick to notify + // if the nickname list is still empty, build a dummy nick to notify if(szMask.isEmpty()) { szMask = m_pUser->name(); diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp index 343bbd793..47caa91c8 100644 --- a/src/modules/reguser/libkvireguser.cpp +++ b/src/modules/reguser/libkvireguser.cpp @@ -159,8 +159,8 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) If [mask] is given, then it is added to the entry mask list.[br] The <name> parameter may contain any character: even spaces are allowed (obviously you have to use quotes in that case).[br] - If the '-r' switch is given , the new entry replaces any previous one with the same <name> (the old entry is removed).[br] - If the '-f' switch is given , and there is an existing entry with the same name , no warning is printed + If the '-r' switch is given, the new entry replaces any previous one with the same <name> (the old entry is removed).[br] + If the '-f' switch is given, and there is an existing entry with the same name, no warning is printed and the old entry is treated just like it has been just added (thus the [mask] is eventually added to its mask list).[br] The '-q' switch causes the command to run in "quiet" mode and print no warning.[br] @examples: @@ -241,7 +241,7 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) Removes the regusers database entry with the specified <name>.[br] If the -n switch is given, and there is a removed entry, this command will restart all the running "notify lists". - If the -q switch is used , no warning is printed if the <name> + If the -q switch is used, no warning is printed if the <name> does not identify an existing entry. @examples: [example] @@ -296,7 +296,7 @@ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) The only restriction on the <mask> is that it must be unique inside the regusers database: you can't match two users with the same mask (it would have rather undefined results).[br] - If -f is used , KVIrc ensures that the mask is unique in the database + If -f is used, KVIrc ensures that the mask is unique in the database and associates is to THIS registered user (breaking the previous associations).<br> Once at least one mask has been added, the user can be "matched" by using the [fnc]$reguser.match[/fnc]() function.[br] @@ -369,7 +369,7 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) reguser.delmask <mask> @description: Removes a mask from the regusers database.[br] - Since masks are unique in the database , you don't need to pass + Since masks are unique in the database, you don't need to pass an <user> parameter: if an <user> entry has the <mask>, removing that <mask> will surely remove it from that <user> entry. (contorsions ?)[br] @examples: @@ -655,12 +655,12 @@ static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c) Adds a property to the registered users database entry with name <name>.[br] The property <property> is set to the specified <value> or is unset if <value> is not given (or is an empty string).[br] - If the '-n' switch is used , and the user entry has been found in the database, + If the '-n' switch is used, and the user entry has been found in the database, all the [doc:notify_list]notify lists[/doc] are restarted.[br] - If the '-a' switch is used , and there are users on IRC currently matched + If the '-a' switch is used, and there are users on IRC currently matched by this reguser entry then their avatar is reset. This is useful when you're changing someone's notify property.[br] - If the -q switch is used , the command runs in "quiet" mode and prints no warnings.[br] + If the -q switch is used, the command runs in "quiet" mode and prints no warnings.[br] @examples: [example] [cmd]reguser.add[/cmd] "Szymon Stefanek" @@ -929,7 +929,7 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) // $reguser.matches(<user_mask>) // @description: // Returns a comma separated list of registered user masks that match <user_mask>.[br] -// User mask must be in the format <nick>!<user>@<host> , where <user> and +// User mask must be in the format <nick>!<user>@<host>, where <user> and // <host> may contain '*' wildcards.[br] // If no registered mask matches the <user_mask> an empty string is returned.[br] // @seealso: @@ -982,9 +982,9 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) $reguser.mask(<name>[,<N>]) @description: Returns the <N>th registration mask for the registered user database record identified - by <name>. If <N> is not given , returns an array of registration masks for that entry.[br] + by <name>. If <N> is not given, returns an array of registration masks for that entry.[br] If <name> does not identify a valid entry an empty string is returned; - if <N> is out of range (or there are no masks at all) , an empty string is returned.[br] + if <N> is out of range (or there are no masks at all), an empty string is returned.[br] <N> is a ZERO BASED index.[br] @examples: [example] @@ -1155,7 +1155,7 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) reguser.wizard [mask] @description: Allows registering an user with an intuitive and easy to use interface. - If [mask] is specified , it is used as inital mask in the dialog. + If [mask] is specified, it is used as inital mask in the dialog. @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], diff --git a/src/modules/rijndael/libkvirijndael.cpp b/src/modules/rijndael/libkvirijndael.cpp index d5ebd0997..9d4ad15a6 100644 --- a/src/modules/rijndael/libkvirijndael.cpp +++ b/src/modules/rijndael/libkvirijndael.cpp @@ -835,9 +835,9 @@ static bool rijndael_module_can_unload(KviModule *) KVIRC_MODULE( "Rijndael crypt engine", "4.0.0", - "Szymon Stefanek <pragma at kvirc dot net>" , + "Szymon Stefanek <pragma at kvirc dot net>", "Exports the rijndael crypt engine", - rijndael_module_init , + rijndael_module_init, rijndael_module_can_unload, 0, rijndael_module_cleanup, diff --git a/src/modules/rijndael/libkvirijndael.h b/src/modules/rijndael/libkvirijndael.h index b51667e50..f6ef1ae14 100644 --- a/src/modules/rijndael/libkvirijndael.h +++ b/src/modules/rijndael/libkvirijndael.h @@ -46,7 +46,7 @@ virtual KviCryptEngine::EncryptResult encrypt(const char * plainText,KviStr &outBuffer); virtual KviCryptEngine::DecryptResult decrypt(const char * inBuffer,KviStr &plainText); protected: - virtual bool binaryToAscii(const char *,int ,KviStr &){ return false; }; + virtual bool binaryToAscii(const char *,int,KviStr &){ return false; }; virtual bool asciiToBinary(const char *,int *,char **){ return false; }; virtual int getKeyLen(){ return 32; }; virtual Rijndael::KeyLength getKeyLenId(){ return Rijndael::Key32Bytes; }; diff --git a/src/modules/rijndael/libkvirijndael_cryptopp.cpp b/src/modules/rijndael/libkvirijndael_cryptopp.cpp index 9df64fb7a..b1d25c11c 100644 --- a/src/modules/rijndael/libkvirijndael_cryptopp.cpp +++ b/src/modules/rijndael/libkvirijndael_cryptopp.cpp @@ -603,9 +603,9 @@ KVIRC_MODULE( "Rijndael crypt engine", "4.0.1", "Copyright © 2009 Kai Wasserbäch <debian@carbon-project.org>" \ - " © 2000-2008 Szymon Stefanek <pragma at kvirc dot net>" , + " © 2000-2008 Szymon Stefanek <pragma at kvirc dot net>", "Exports the rijndael crypt engine", - rijndael_module_init , + rijndael_module_init, rijndael_module_can_unload, 0, rijndael_module_cleanup, diff --git a/src/modules/rijndael/rijndael.cpp b/src/modules/rijndael/rijndael.cpp index baa70a30f..59e42debe 100644 --- a/src/modules/rijndael/rijndael.cpp +++ b/src/modules/rijndael/rijndael.cpp @@ -47,7 +47,7 @@ // // -// This implementation works on 128 , 192 , 256 bit keys +// This implementation works on 128, 192, 256 bit keys // and on 128 bit blocks // diff --git a/src/modules/rijndael/rijndael.h b/src/modules/rijndael/rijndael.h index bd2d7401f..caeda9e9e 100644 --- a/src/modules/rijndael/rijndael.h +++ b/src/modules/rijndael/rijndael.h @@ -49,7 +49,7 @@ // // -// This implementation works on 128 , 192 , 256 bit keys +// This implementation works on 128, 192, 256 bit keys // and on 128 bit blocks // @@ -107,14 +107,14 @@ typedef unsigned short UINT16; class Rijndael { public: - enum Direction { Encrypt , Decrypt }; - enum Mode { ECB , CBC , CFB1 }; - enum KeyLength { Key16Bytes , Key24Bytes , Key32Bytes }; + enum Direction { Encrypt, Decrypt }; + enum Mode { ECB, CBC, CFB1 }; + enum KeyLength { Key16Bytes, Key24Bytes, Key32Bytes }; Rijndael(); ~Rijndael(); protected: - enum State { Valid , Invalid }; + enum State { Valid, Invalid }; State m_state; Mode m_mode; diff --git a/src/modules/rot13/libkvirot13.cpp b/src/modules/rot13/libkvirot13.cpp index 8fc0a6fd3..bc9c894bf 100644 --- a/src/modules/rot13/libkvirot13.cpp +++ b/src/modules/rot13/libkvirot13.cpp @@ -162,9 +162,9 @@ static bool rot13_module_can_unload(KviModule *) KVIRC_MODULE( "ROT13 crypt engine", "4.0.0", - "Aeriana <aeriana at quasarnet dot org>" , + "Aeriana <aeriana at quasarnet dot org>", "Exports the ROT13 text transformation engine", - rot13_module_init , + rot13_module_init, rot13_module_can_unload, 0, rot13_module_cleanup, diff --git a/src/modules/setup/libkvisetup.cpp b/src/modules/setup/libkvisetup.cpp index 22b08e329..ec01aba18 100644 --- a/src/modules/setup/libkvisetup.cpp +++ b/src/modules/setup/libkvisetup.cpp @@ -148,7 +148,7 @@ KVIRC_MODULE( "4.0.0", "Szymon Stefanek <pragma at kvirc dot net>", "First-time-run setup wizard", - setup_module_init , + setup_module_init, setup_module_can_unload, 0, setup_module_cleanup, diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp index cf109ef3c..7f383d6c2 100644 --- a/src/modules/setup/setupwizard.cpp +++ b/src/modules/setup/setupwizard.cpp @@ -50,7 +50,7 @@ bool g_bFoundMirc; #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) #include <windows.h> #include <winnls.h> // for MultiByteToWideChar - #include <objbase.h> // CoCreateInstance , CoInitialize & CO. + #include <objbase.h> // CoCreateInstance, CoInitialize & CO. #include <shlobj.h> // IShellLink IPersistFile & CO. #else #include <unistd.h> // for symlink() @@ -796,7 +796,7 @@ void KviSetupWizard::makeLink() // You need this horrible snippet of code to create a shortcut!!!! // // you have to: - // - dig in the registry , + // - dig in the registry, // - trigger the entire COM subsystem // - bring up a couple of OLE interfaces.... // - use some obscure functions like MultiByteToWideChar @@ -840,7 +840,7 @@ void KviSetupWizard::makeLink() if(CoCreateInstance(CLSID_ShellLink,NULL,CLSCTX_INPROC_SERVER, IID_IShellLink,(void **)&psl) == S_OK) { - // just for fun , lookup another shell interface + // just for fun, lookup another shell interface IPersistFile* ppf; diff --git a/src/modules/sharedfile/libkvisharedfile.cpp b/src/modules/sharedfile/libkvisharedfile.cpp index 62c03d4ca..483c93f93 100644 --- a/src/modules/sharedfile/libkvisharedfile.cpp +++ b/src/modules/sharedfile/libkvisharedfile.cpp @@ -59,7 +59,7 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; @description: Adds <filename> to the list of the active shared files. The users will be able to request the file via [cmd]dcc.get[/cmd]. - If [user_mask] is specified , the access to the file is limited + If [user_mask] is specified, the access to the file is limited to the users that match this mask, otherwise the mask will be automatically set to '*!*@*'.[br] If the 't' switch is used, the sharedfile will be removed after diff --git a/src/modules/sharedfileswindow/sharedfileswindow.cpp b/src/modules/sharedfileswindow/sharedfileswindow.cpp index b0a05320f..79e460005 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/sharedfileswindow.cpp @@ -208,7 +208,7 @@ KviSharedFilesTreeWidgetItem::~KviSharedFilesTreeWidgetItem() KviSharedFilesWindow::KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm) -: KviWindow(KVI_WINDOW_TYPE_TOOL,lpFrm,"shared files window",0) , KviModuleExtension(d) +: KviWindow(KVI_WINDOW_TYPE_TOOL,lpFrm,"shared files window",0), KviModuleExtension(d) { g_pSharedFilesWindow = this; m_pSplitter = new KviTalSplitter(Qt::Horizontal,this); diff --git a/src/modules/sharedfileswindow/sharedfileswindow.h b/src/modules/sharedfileswindow/sharedfileswindow.h index 7ea97b770..31a67019d 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.h +++ b/src/modules/sharedfileswindow/sharedfileswindow.h @@ -74,7 +74,7 @@ protected slots: }; -class KviSharedFilesWindow : public KviWindow , public KviModuleExtension +class KviSharedFilesWindow : public KviWindow, public KviModuleExtension { friend class KviSharedFilesItem; Q_OBJECT diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp index 1b51b83d9..5c2863f1e 100644 --- a/src/modules/snd/libkvisnd.cpp +++ b/src/modules/snd/libkvisnd.cpp @@ -505,7 +505,7 @@ void KviSoundThread::run() if(audiofd_c < 0) { qDebug("Could not open audio device /dev/dsp! [OSS+AUDIOFILE]"); - qDebug("(the device is probably busy , errno = %d)",errno); + qDebug("(the device is probably busy, errno = %d)",errno); goto exit_thread; } diff --git a/src/modules/socketspy/socketspywindow.cpp b/src/modules/socketspy/socketspywindow.cpp index 5bd914f6d..4feeb2ebe 100644 --- a/src/modules/socketspy/socketspywindow.cpp +++ b/src/modules/socketspy/socketspywindow.cpp @@ -35,7 +35,7 @@ extern KviPointerList<KviSocketSpyWindow> * g_pSocketSpyWindowList; KviSocketSpyWindow::KviSocketSpyWindow(KviFrame * lpFrm,KviConsole * lpConsole) -: KviWindow(KVI_WINDOW_TYPE_SOCKETSPY,lpFrm,"socket_spy",lpConsole) , KviIrcDataStreamMonitor(lpConsole->context()) +: KviWindow(KVI_WINDOW_TYPE_SOCKETSPY,lpFrm,"socket_spy",lpConsole), KviIrcDataStreamMonitor(lpConsole->context()) { g_pSocketSpyWindowList->append(this); m_pSplitter = new KviTalSplitter(Qt::Horizontal,this); diff --git a/src/modules/str/libkvistr.cpp b/src/modules/str/libkvistr.cpp index b663bda54..862e33ff3 100644 --- a/src/modules/str/libkvistr.cpp +++ b/src/modules/str/libkvistr.cpp @@ -1150,7 +1150,7 @@ static bool str_kvs_fnc_match(KviKvsModuleFunctionCall * c) <string> $str.word(<n:int>,<string:string>) @description: Returns the nth word inside the <string> (with n starting from 0!)[br] - A word is a substring not containing spaces (ASCII chars 32, carriage returns , tabs etc...).[br] + A word is a substring not containing spaces (ASCII chars 32, carriage returns, tabs etc...).[br] If the string contains less than n+1 words then an empty string is returned.[br] This function is faster than a call to [fnc]split[/fnc]() and array indexing if you need a single word to be extracted from a complex string.[br] diff --git a/src/modules/system/libkvisystem.cpp b/src/modules/system/libkvisystem.cpp index 247e870cc..7d0d4b5fb 100644 --- a/src/modules/system/libkvisystem.cpp +++ b/src/modules/system/libkvisystem.cpp @@ -612,7 +612,7 @@ static bool system_kvs_fnc_dbus(KviKvsModuleFunctionCall *c) system.setenv <variable:string> [<value:string>] @description: Sets the enviroinement <variable> to the <value> string.[br] - If <value> is not given , the <variable> is unset.[br] + If <value> is not given, the <variable> is unset.[br] @seealso: [fnc]$system.getenv[/fnc] */ diff --git a/src/modules/tip/libkvitip.cpp b/src/modules/tip/libkvitip.cpp index 2b36fdf09..bf872a037 100644 --- a/src/modules/tip/libkvitip.cpp +++ b/src/modules/tip/libkvitip.cpp @@ -241,7 +241,7 @@ void KviTipWindow::closeEvent(QCloseEvent *e) tip.open [tip_file_name:string] @description: Opens the "did you know..." tip window.<br> - If <tip_file_name> is specified , that tip is used instead of + If <tip_file_name> is specified, that tip is used instead of the default tips provided with kvirc.<br> <tip_file_name> must be a file name with no path and must refer to a standard KVIrc configuration file found in the global or local diff --git a/src/modules/torrent/tc_ktorrentdbusinterface.cpp b/src/modules/torrent/tc_ktorrentdbusinterface.cpp index 55506e2b6..537e828bf 100644 --- a/src/modules/torrent/tc_ktorrentdbusinterface.cpp +++ b/src/modules/torrent/tc_ktorrentdbusinterface.cpp @@ -238,7 +238,7 @@ return 0; } - QString KviKTorrentDBusInterface::fileName(int , int ) + QString KviKTorrentDBusInterface::fileName(int, int ) { /* CHECK_RANGE_STRING(i, m_ti.size()) @@ -254,7 +254,7 @@ return QString(); } - QString KviKTorrentDBusInterface::filePriority(int , int ) + QString KviKTorrentDBusInterface::filePriority(int, int ) { /* CHECK_RANGE_STRING(i, m_ti.size()) @@ -278,7 +278,7 @@ return QString(); } - bool KviKTorrentDBusInterface::setFilePriority(int , int , const QString &) + bool KviKTorrentDBusInterface::setFilePriority(int, int, const QString &) { /* CHECK_RANGE_BOOL(i, m_ti.size()) diff --git a/src/modules/trayicon/libkvitrayicon.cpp b/src/modules/trayicon/libkvitrayicon.cpp index 9d7a3aef4..b10f40e9a 100644 --- a/src/modules/trayicon/libkvitrayicon.cpp +++ b/src/modules/trayicon/libkvitrayicon.cpp @@ -155,23 +155,23 @@ void KviTrayIcon::flashingTimerShot() static const char * idlemsgs[NIDLEMSGS]= { - __tr("Nothing is happening...") , - __tr("Just idling...") , - __tr("Dum de dum de dum...") , - __tr("Hey man... do something!") , - __tr("Umpf!") , - __tr("Silence speaking") , - __tr("Are ya here?") , - __tr("The world has stopped?") , - __tr("Everything is all right") , - __tr("idle()") , - __tr("It's so cold here...") , - __tr("Do not disturb... watching TV") , - __tr("Just vegetating") , - __tr("Hey... are ya sure that your network is up?") , - __tr("Seems like the world has stopped spinning") , - __tr("This silence is freaking me out!") , - __tr("Mieeeeeowww!") , + __tr("Nothing is happening..."), + __tr("Just idling..."), + __tr("Dum de dum de dum..."), + __tr("Hey man... do something!"), + __tr("Umpf!"), + __tr("Silence speaking"), + __tr("Are ya here?"), + __tr("The world has stopped?"), + __tr("Everything is all right"), + __tr("idle()"), + __tr("It's so cold here..."), + __tr("Do not disturb... watching TV"), + __tr("Just vegetating"), + __tr("Hey... are ya sure that your network is up?"), + __tr("Seems like the world has stopped spinning"), + __tr("This silence is freaking me out!"), + __tr("Mieeeeeowww!"), __tr("idle idle idle idle!") }; @@ -550,7 +550,7 @@ static KviTrayIcon * trayicon_find(KviFrame *f) @short: Shows the dock widget for the current frame window @keyterms: - dock widget , system tray + dock widget, system tray @syntax: trayicon.show @description: @@ -561,12 +561,12 @@ static KviTrayIcon * trayicon_find(KviFrame *f) text in any console window, the square becomes red if the text is highlighted.[br] The bottom right square appears when there is some new text in any channel window, and it becomes red when the text is highlighted.[br] The upper right square refers to - query windows and the upper left one to any other kind of window (dcc , links...).[br] + query windows and the upper left one to any other kind of window (dcc, links...).[br] If you move the mouse over the dock widget a tooltip will show you the last lines of the "new" text in all these windows.[br] This is useful when you keep the main KVIrc window minimized and you're working on something else: - if the dock widget shows nothing but the earth icon , nothing is happening in the main KVIrc window. - If the dock widget shows one or more white (or red) squares , you can move the mouse over + if the dock widget shows nothing but the earth icon, nothing is happening in the main KVIrc window. + If the dock widget shows one or more white (or red) squares, you can move the mouse over and check what's happened exactly and eventually bring up the main KVIrc window by clicking on the widget.[br] [big]tecnical details[/big] The dock widget is currently working in KDE compilation mode only: @@ -650,7 +650,7 @@ static bool trayicon_kvs_cmd_hidewindow(KviKvsModuleCommandCall * c) @syntax: $reguser.isVisible() @description: - Returns 1 if the dock widget is actually visible , 0 otherwise. + Returns 1 if the dock widget is actually visible, 0 otherwise. @seealso: [cmd]trayicon.show[/cmd] */ @@ -733,7 +733,7 @@ KVIRC_MODULE( "Copyright (C) 2007 Alexey Uzhva <alexey at kvirc dot ru>" \ "Copyright (C) 2008 Elvio Basello <hellvis69 at netsons dot org>", "Exports the /trayicon.* interface\n", - trayicon_module_init , + trayicon_module_init, trayicon_module_can_unload, 0, trayicon_module_cleanup, diff --git a/src/modules/upnp/manager.cpp b/src/modules/upnp/manager.cpp index 8508db98a..8edb2b952 100644 --- a/src/modules/upnp/manager.cpp +++ b/src/modules/upnp/manager.cpp @@ -78,7 +78,7 @@ void Manager::initialize() // Create the SSDP object to detect devices m_pSsdpConnection = new SsdpConnection(); - connect(m_pSsdpConnection, SIGNAL( deviceFound(const QString&,int,const QString&) ) , + connect(m_pSsdpConnection, SIGNAL( deviceFound(const QString&,int,const QString&) ), this, SLOT( slotDeviceFound(const QString&,int,const QString&) ) ); // Create a timer diff --git a/src/modules/upnp/service.cpp b/src/modules/upnp/service.cpp index 00f656ba1..08b4f1fb8 100644 --- a/src/modules/upnp/service.cpp +++ b/src/modules/upnp/service.cpp @@ -58,7 +58,7 @@ Service::Service(const QString &hostname, int port, const QString &informationUr { m_szInformationUrl = informationUrl; m_pHttp = new QHttp(hostname, port); - connect(m_pHttp, SIGNAL( requestFinished(int,bool) ) , this, SLOT( slotRequestFinished(int,bool) ) ); + connect(m_pHttp, SIGNAL( requestFinished(int,bool) ), this, SLOT( slotRequestFinished(int,bool) ) ); qDebug() << "UPnP::Service: Created information service url='" << m_szInformationUrl << "'." << endl; } @@ -76,7 +76,7 @@ Service::Service(const ServiceParameters ¶ms) , m_iPort(params.port) { m_pHttp = new QHttp(params.hostname, params.port); - connect(m_pHttp, SIGNAL( requestFinished(int,bool) ) , this, SLOT( slotRequestFinished(int,bool) ) ); + connect(m_pHttp, SIGNAL( requestFinished(int,bool) ), this, SLOT( slotRequestFinished(int,bool) ) ); qDebug() << "CREATED UPnP::Service: url='" << m_szControlUrl << "' id='" << m_szServiceId << "'." << endl; } @@ -116,8 +116,8 @@ int Service::callActionInternal(const QString &actionName, const QMap<QString,QS qDebug() << "UPnP::Service: calling remote procedure '" << actionName << "'." << endl; // Create the data message - //NOTE: we shouldm use serviceId_ instead of serviceType_ , but it seems that my router - // (and maybe others) are reporting wrong Ids , while they're gonna accepting only the + //NOTE: we shouldm use serviceId_ instead of serviceType_, but it seems that my router + // (and maybe others) are reporting wrong Ids, while they're gonna accepting only the // correct ones. This is a decoded reply from my Zyxel: // Service : diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp index d71ed4ba6..5c6b1ef5d 100644 --- a/src/modules/url/libkviurl.cpp +++ b/src/modules/url/libkviurl.cpp @@ -963,7 +963,7 @@ void url_module_config() KVIRC_MODULE( "URL", - "4.0.0" , + "4.0.0", "Copyright (C) 2002 Andrea Parrella <yap@yapsoft.it>", "url list module for KVIrc", url_module_init, diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index d823c55b8..c28799804 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -874,7 +874,7 @@ static bool window_kvs_cmd_listtypes(KviKvsModuleCommandCall * c) See [cmd]window.listtypes[/cmd] for a list of available window types in this KVIrc release.[br] If <type> is the special word 'all', all the window types are listed.[br] <irc_context_id> specifies the irc context in which the windows are searched.[br] - If no <irc_context_id> is specified , the current one is used.[br] + If no <irc_context_id> is specified, the current one is used.[br] If <irc_context_id> is the special word 'all', all the irc context are searched.[br] If <irc_context_id> is the special word 'none' then only windows not belonging to any irc context are listed.[br] @@ -899,7 +899,7 @@ static bool window_kvs_cmd_listtypes(KviKvsModuleCommandCall * c) [comment]# List all the user windows created with $window.open[/comment] [comment]# They may either belong to an irc context or not[/comment] [cmd]echo[/cmd] $window.list(userwnd,any) - [comment]# Ok , let's use it[/comment] + [comment]# Ok, let's use it[/comment] [comment]# A nice alias that allows iterating commands through all the consoles[/comment] [comment]# Note the array returned by $window.list[/comment] [comment]# This is by LatinSuD :)[/comment] |
