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 <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2018-02-12 17:39:58 +01:00
parent 65b004204e
commit a060bf9673

View File

@ -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> = $$srcbase \n");
print("<outbase> = $$outbase \n");
print("<srcbase> = $basedir \n");
print("<outbase> = $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);