<commit_before>#!/usr/bin/env ruby -w

require 'Qt'
require 'rexml/document'

require '../base/kicons.rb'
require '../base/rui.rb'

RectRTTI = 5 # Qt::CanvasRectangle::RTTI is b0rked

class MyCanvasView < Qt::CanvasView
   def initialize(canvas, parent)
      @canvas = canvas
      super(canvas, parent)
   end
   def contentsMousePressEvent(e)
      super
      list = canvas.collisions(e.pos)
      return if list.empty?
      c = list.first
      return if c.rtti != RectRTTI 
      c.hide
      @canvas.update
   end
end
<commit_msg>Added call to Qt::CanvasRectangle.rtti() instead of hard coded constant<commit_after>#!/usr/bin/env ruby -w

require 'Qt'
require 'rexml/document'

require '../base/kicons.rb'
require '../base/rui.rb'

class MyCanvasView < Qt::CanvasView
   def initialize(canvas, parent)
      @canvas = canvas
      super(canvas, parent)
   end
   def contentsMousePressEvent(e)
      super
      list = canvas.collisions(e.pos)
      return if list.empty?
      c = list.first
      return if c.rtti != Qt::CanvasRectangle.rtti() 
      c.hide
      @canvas.update
   end
end

{'fraction_non_alphanumeric': 0.11636363636363636, 'fraction_numerical': 0.0018181818181818182, 'mean_word_length': 2.757679180887372, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1453676', 'n_tokens_mistral': 372, 'n_tokens_neox': 366, 'n_words': 93}