<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2005-02-17</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000918386</issuerCik>
        <issuerName>QLOGIC CORP</issuerName>
        <issuerTradingSymbol>QLGC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001176524</rptOwnerCik>
            <rptOwnerName>BIRNBAUM JOEL S</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>26650 ALISO VIEJO PARKWAY</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>ALISO VIEJO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>92656</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Stock Options (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>41.63</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2006-02-17</value>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <value>2015-02-17</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>40000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Exercisable as to 1/3 of the shares one year from date of grant, with an additional 1/3 becoming exercisable every twelve months thereafter.</footnote>
    </footnotes>

    <remarks>EXHIBIT LIST:

Exhibit 24 - Power of Attorney for Joel S. Birnbaum dated 2/17/05</remarks>

    <ownerSignature>
        <signatureName>/s/ Michael Hawkins as Attorney-In-Fact for Joel S. Birnbaum</signatureName>
        <signatureDate>2005-02-28</signatureDate>
    </ownerSignature>
</ownershipDocument>
