-
Notifications
You must be signed in to change notification settings - Fork 74
Porting scripts to KVIrc 4
This is a quick list of things you should take care of when porting kvs scripts from KVIrc 3 to KVIrc 4:
Old Name | New Name | Applies to |
---|---|---|
$setCaption | $setWindowTitle | widget class |
$setIcon | $setwindowIcon | widget class |
$setColStretch | $setColumnStretch | layout class |
$setDisplayStr | $displayStr | lcd class |
$setDisplayInt | $displayInt | lcd class |
$setDisplayDouble | $displayDouble | lcd class |
$setLayoutOrientation | $setOrientation | groupbox class |
$base64ToText | $base64ToAscii |
-
The widget class does not need anymore the "Customize" flag in
$setWFlags()
-
The
$time()
function has been removed in favour of$date
:echo $date("F T",$unixtime)
-
objects.bitBlt
has been removed. If you want to paint on a widget, you must do it in its paintEvent using a painter. -
in
$str.replace
the order of the 2nd and 3rd parameter has been inverted: old format:$str.replace(text, replace, search)
new format:$str.replace(text, search, replace)
This can create some bad problem with old scripts trying to trim a string using: `echo $str.replace(" the string ", "", " "); In the worst case, this will create an endless loop.
-
Functions with nocase() in the end have been removed. Check their counterpart removing nocase part. Eg:
$str.containsnocase("string","test")
will be$str.contains("string","test",true)