[Kde-pim] Review Request 115782: Coding Style for emptytrashcommand.cpp

Guy Maurel guy-kde at maurel.de
Fri Feb 21 16:29:52 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115782/
-----------------------------------------------------------

(Updated Feb. 21, 2014, 4:29 p.m.)


Review request for KDEPIM-Libraries, David Faure, Kevin Krammer, and Laurent Montel.


Changes
-------

Some problems with normalize.

1. the macro Q_PRIVATE_SLOT( d, void updateActions() ) is affected.
To avoid the change, I propose:
diff --git a/util/normalize/main.cpp b/util/normalize/main.cpp
index a0c4dc3..ef46b70 100644
--- a/util/normalize/main.cpp
+++ b/util/normalize/main.cpp
@@ -126,7 +126,7 @@ void check(const QString &fileName)
         if (bline.isEmpty())
             break;
         QString line = QString::fromLocal8Bit(bline);
-        found |= checkSignature(fileName, line, "SLOT");
+        found |= checkSignature(fileName, line, " SLOT");
         found |= checkSignature(fileName, line, "SIGNAL");
         if (modify)
             lines << line;

2. Changes of character from
      Klarälvdalens
   to
      Klar??lvdalens
   The same from Vrátil to Vr??til
   The problem occurs at line 125:
      QByteArray bline = file.readLine(16384);
   bline is already wrong!

What is to do? 


Repository: kdepimlibs


Description
-------

# Using:
astyle \
    --indent=spaces --max-instatement-indent=80 --indent-cases \
    --pad-header --pad-oper --unpad-paren \
    --align-pointer=name --align-reference=name \
    --max-instatement-indent=80 --min-conditional-indent=1 \
    $1
#
# correct the SIGNAL and SLOT macros (under qt5/qtrepotools/util/normalize):
normalize --modify $1
#
# add <SPACE> vor ": public"
gawk -f ${DIR}/Public-change.awk ${WHERE} > ${WHERE}-p
mv ${WHERE}-p ${WHERE}
#
# change " & " to " &"
gawk -f ${DIR}/Change-spaceANDspace.awk $1 > $1-a
mv $1-a $1
#
# change "[ " to "[" and " ]" to "]"
gawk -f ${DIR}/spaceInArray-change.awk ${WHERE} > ${WHERE}-k
mv ${WHERE}-k ${WHERE}
#
# delete one line if two empties lines are present 
gawk -f ${DIR}/Twice-change.awk $1 > $1-a
mv $1-a $1
#
# delete first/last empty line(s)
gawk -f ${DIR}/First-change.awk ${WHERE} > ${WHERE}-c
mv ${WHERE}-c ${WHERE}
#
# lines with initialization(s)
gawk -f ${DIR}/Default-1-change.awk < ${WHERE} > ${WHERE}-d1
mv ${WHERE}-d1 ${WHERE}
gawk -f ${DIR}/Default-2-change.awk < ${WHERE} > ${WHERE}-d2
mv ${WHERE}-d2 ${WHERE}
#
# change <SPACE> after keyword
${DIR}/coding-style-change-SpaceAfter.sh ${WHERE}


Diffs
-----

  akonadi/kmime/emptytrashcommand.cpp eb7f1e7 

Diff: https://git.reviewboard.kde.org/r/115782/diff/


Testing
-------


Thanks,

Guy Maurel

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list