mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
ktradeclient: minor code shrink
This commit is contained in:
parent
5ce689b37a
commit
c69fc1366b
3 changed files with 6 additions and 15 deletions
|
@ -251,9 +251,7 @@ macro_optional_add_subdirectory(kdontchangethehostname)
|
|||
macro_optional_add_subdirectory(kglobalaccel)
|
||||
macro_optional_add_subdirectory(ktimezoned)
|
||||
# Command-line tools (e.g. for shell scripts)
|
||||
if ( UNIX )
|
||||
macro_optional_add_subdirectory(kdeeject)
|
||||
endif ( UNIX )
|
||||
macro_optional_add_subdirectory(kfile)
|
||||
macro_optional_add_subdirectory(kiconfinder)
|
||||
macro_optional_add_subdirectory(kioclient)
|
||||
|
|
|
@ -27,5 +27,3 @@ install(CODE "
|
|||
set(KCP_PATH \"\$ENV{DESTDIR}${LIBEXEC_INSTALL_DIR}/kcheckpass\")
|
||||
EXECUTE_PROCESS(COMMAND sh -c \"chown root '\${KCP_PATH}' && chmod +s '\${KCP_PATH}'\")
|
||||
")
|
||||
|
||||
#EXTRA_DIST = README
|
||||
|
|
|
@ -70,25 +70,20 @@ int main( int argc, char **argv )
|
|||
printf("got %d offers.\n", offers.count());
|
||||
|
||||
int i = 0;
|
||||
KService::List::ConstIterator it = offers.constBegin();
|
||||
const KService::List::ConstIterator end = offers.constEnd();
|
||||
for (; it != end; ++it, ++i )
|
||||
foreach(const KSharedPtr<KService> it, offers)
|
||||
{
|
||||
printf("---- Offer %d ----\n", i);
|
||||
QStringList props = (*it)->propertyNames();
|
||||
QStringList::ConstIterator propIt = props.constBegin();
|
||||
QStringList::ConstIterator propEnd = props.constEnd();
|
||||
for (; propIt != propEnd; ++propIt )
|
||||
foreach(const QString propIt , (it)->propertyNames() )
|
||||
{
|
||||
QVariant prop = (*it)->property( *propIt );
|
||||
QVariant prop = (it)->property( propIt );
|
||||
|
||||
if ( !prop.isValid() )
|
||||
{
|
||||
printf("Invalid property %s\n", (*propIt).toLocal8Bit().data());
|
||||
printf("Invalid property %s\n", (propIt).toLocal8Bit().data());
|
||||
continue;
|
||||
}
|
||||
|
||||
QString outp = *propIt;
|
||||
QString outp = propIt;
|
||||
outp += " : '";
|
||||
|
||||
switch ( prop.type() )
|
||||
|
|
Loading…
Add table
Reference in a new issue