File: convert-display.pl

package info (click to toggle)
kde-dev-scripts 4%3A18.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,496 kB
  • sloc: perl: 15,466; lisp: 5,627; sh: 4,157; python: 3,892; ruby: 2,158; makefile: 16; sed: 9
file content (19 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl 

# Laurent Montel <montel@kde.org>
# This function convert qt_xdisplay and qt_rootwin to qt4 function
# it added include too

use File::Basename;
use lib dirname( $0 );
use functionUtilkde;
use strict;

foreach my $file (@ARGV) {
	functionUtilkde::substInFile {
	s!qt_xdisplay\s*\(\s*\)!QX11Info::display()!;
	s!qt_xrootwin\s*\(\s*\)!QX11Info::appRootWindow()!;
    } $file;
	functionUtilkde::addIncludeInFile( $file, "QX11Info");
}
functionUtilkde::diffFile( @ARGV );