From a060bf9673477499d85b04d8d5b21fb2a2f15c4f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 12 Feb 2018 17:39:58 +0100 Subject: syncqt: untangle loadSyncProfile() calling convention don't pass arguments, as the sourced sync.profile's make assumptions about the global variables' presence anyway. don't return a value, as it's ignored anyway. fix the documentation (also that of locateSyncProfile()). Change-Id: I7527546718b12737d7a4551a834d7f0ca26a8a7e Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- bin/syncqt.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/syncqt.pl b/bin/syncqt.pl index dd38bece76..52bd97e88d 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -647,17 +647,15 @@ sub listSubdirs { ###################################################################### # Syntax: loadSyncProfile() # -# Purpose: Locates the sync.profile. -# Returns: Hashmap of module name -> directory. +# Purpose: Loads the sync.profile. ###################################################################### sub loadSyncProfile { - my ($srcbase, $outbase) = @_; if ($verbose_level) { - print(" = $$srcbase \n"); - print(" = $$outbase \n"); + print(" = $basedir \n"); + print(" = $out_basedir \n"); } - my $syncprofile = "$$srcbase/sync.profile"; + my $syncprofile = "$basedir/sync.profile"; my $result; unless ($result = do "$syncprofile") { die "syncqt couldn't parse $syncprofile: $@" if $@; @@ -669,8 +667,6 @@ sub loadSyncProfile { $reverse_classnames{$cn} = $fn; } } - - return $result; } sub basePrettify { @@ -685,6 +681,11 @@ sub cleanPath { return $arg; } +###################################################################### +# Syntax: locateSyncProfile() +# +# Purpose: Locates the sync.profile. +###################################################################### sub locateSyncProfile { my ($directory) = @_; @@ -889,7 +890,7 @@ our @ignore_for_qt_module_check = (); our %inject_headers = (); # load the module's sync.profile here, before we can -loadSyncProfile(\$basedir, \$out_basedir); +loadSyncProfile(); @modules_to_sync = keys(%modules) if($#modules_to_sync == -1); -- cgit v1.2.3