Skip to content

Commit 0676eb7

Browse files
authored
KritaAPI: Show which methods are private
1 parent 18f74cb commit 0676eb7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plugindevtools/PluginDevTools/PluginDevToolsDocker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def genMethodList(self, className, obj, meta ):
432432
propName[0]
433433
)
434434
if 'Private' in metaDict2['methods'][key]['rec'][1]:
435-
propName[0] = propName[0] + " [private]"
435+
propName[0] = "[private] " + propName[0]
436436
#del metaDict2['methods'][key] #testing
437437

438438
if staticMethod:
@@ -458,7 +458,7 @@ def genMethodList3(self, className, meta):
458458
'type':0,
459459
'name': key,
460460
'pnames': [ p['name'] for p in meta['methods'][key]['params'] ],
461-
'rec':[ key+'('+', '.join([ p['type']+' '+p['name']+('='+p['optional'] if p['optional'] else '') for p in meta['methods'][key]['params'] ])+')', meta['methods'][key]['access'], meta['methods'][key]['return'] ] }
461+
'rec':[ ('[private] ' if 'private' in meta['methods'][key]['access'] else '' )+key+'('+', '.join([ p['type']+' '+p['name']+('='+p['optional'] if p['optional'] else '') for p in meta['methods'][key]['params'] ])+')', meta['methods'][key]['access'], meta['methods'][key]['return'] ] }
462462

463463
for declare in meta['declare']:
464464
#print ("m", declare)
@@ -1857,13 +1857,11 @@ def __init__(self, caller):
18571857
self.centralWidget.eventCodeBtn.clicked.connect(self.updateCode)
18581858

18591859

1860-
18611860

18621861
def hideEvent(self, event):
18631862
self.stop()
18641863
super().hideEvent(event)
18651864

1866-
18671865

18681866
def updateCode(self):
18691867
content = self.centralWidget.eventCodeTextEdit.toPlainText()

0 commit comments

Comments
 (0)