mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +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(kglobalaccel)
|
||||||
macro_optional_add_subdirectory(ktimezoned)
|
macro_optional_add_subdirectory(ktimezoned)
|
||||||
# Command-line tools (e.g. for shell scripts)
|
# Command-line tools (e.g. for shell scripts)
|
||||||
if ( UNIX )
|
macro_optional_add_subdirectory(kdeeject)
|
||||||
macro_optional_add_subdirectory(kdeeject)
|
|
||||||
endif ( UNIX )
|
|
||||||
macro_optional_add_subdirectory(kfile)
|
macro_optional_add_subdirectory(kfile)
|
||||||
macro_optional_add_subdirectory(kiconfinder)
|
macro_optional_add_subdirectory(kiconfinder)
|
||||||
macro_optional_add_subdirectory(kioclient)
|
macro_optional_add_subdirectory(kioclient)
|
||||||
|
|
|
@ -27,5 +27,3 @@ install(CODE "
|
||||||
set(KCP_PATH \"\$ENV{DESTDIR}${LIBEXEC_INSTALL_DIR}/kcheckpass\")
|
set(KCP_PATH \"\$ENV{DESTDIR}${LIBEXEC_INSTALL_DIR}/kcheckpass\")
|
||||||
EXECUTE_PROCESS(COMMAND sh -c \"chown root '\${KCP_PATH}' && chmod +s '\${KCP_PATH}'\")
|
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());
|
printf("got %d offers.\n", offers.count());
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
KService::List::ConstIterator it = offers.constBegin();
|
foreach(const KSharedPtr<KService> it, offers)
|
||||||
const KService::List::ConstIterator end = offers.constEnd();
|
|
||||||
for (; it != end; ++it, ++i )
|
|
||||||
{
|
{
|
||||||
printf("---- Offer %d ----\n", i);
|
printf("---- Offer %d ----\n", i);
|
||||||
QStringList props = (*it)->propertyNames();
|
foreach(const QString propIt , (it)->propertyNames() )
|
||||||
QStringList::ConstIterator propIt = props.constBegin();
|
|
||||||
QStringList::ConstIterator propEnd = props.constEnd();
|
|
||||||
for (; propIt != propEnd; ++propIt )
|
|
||||||
{
|
{
|
||||||
QVariant prop = (*it)->property( *propIt );
|
QVariant prop = (it)->property( propIt );
|
||||||
|
|
||||||
if ( !prop.isValid() )
|
if ( !prop.isValid() )
|
||||||
{
|
{
|
||||||
printf("Invalid property %s\n", (*propIt).toLocal8Bit().data());
|
printf("Invalid property %s\n", (propIt).toLocal8Bit().data());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString outp = *propIt;
|
QString outp = propIt;
|
||||||
outp += " : '";
|
outp += " : '";
|
||||||
|
|
||||||
switch ( prop.type() )
|
switch ( prop.type() )
|
||||||
|
|
Loading…
Add table
Reference in a new issue