According to IATA (who are an official source for these codes),
QSF = Setif Off-line Pt Algeria
QLA = Lasham Off-line Pt United Kingdom
I don't know where those other definitions came from.
See for yourself:
http://www.iata.org/codes/index.htm
In general, every city with an airport has a city code, and each airport has an airport code.
So, for instance:
City Code => Airports in that city
WAS => IAD,DCA
CHI => ORD,MDW
NYC => JFK,LGW (and EWR in an international context)
DTT => DTW
PHL => PHL
LAX => LAX
SFO => SFO
EWR => EWR
DFW => DAL,DFW
HOU => IAH,HOU
BWI => BWI
etc.
It's very confusing because sometimes the airport code and city code are the same, and sometimes there's overlap. Most of the time it's unambigous.